Jump to content

[SOLVED] curl question


adv

Recommended Posts

hello is there a way to read emails with curl ?

like in gmail ... inbox or trash

 

after i log in with curl and then go to lets say:

http://mail.google.com/mail/?shva=1#inbox

 

is there a way to open each message in inbox

i see that when u read a message it shows like this

http://mail.google.com/mail/?shva=1#inbox/11f08c542531d23d

 

but how do i do it without knowing /11f08c542531d23d

just to get all messages one by one ...

something like that :D thanks

Link to comment
Share on other sites

Okay when you open gmail.. the page loads up and you see your messages (plus links) these are build by the dynamic page..

So http://mail.google.com/mail/?shva=1#inbox contains the links ie http://mail.google.com/mail/?shva=1#inbox/11f08c542531d23d, So if you read the html contents it must contain "?shva=1#inbox/11f08c542531d23d" thus you know the "inbox/11f08c542531d23d" code

 

however i truly recommand you take the imap route..

 

untested

<?php
$mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "username@gmail.com", "password")
     or die("can't connect: " . imap_last_error());
echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{imap.gmail.com:993/imap/ssl}INBOX", "*");

if ($folders == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($folders as $val) {
        echo $val . "<br />\n";
    }
}

echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);

if ($headers == false) {
    echo "Call failed<br />\n";
} else {
    foreach ($headers as $val) {
        echo $val . "<br />\n";
    }
}

imap_close($mbox);
?>

Link to comment
Share on other sites

Hotmail use "HTTP" access if you want POP you need to pay for the PLUS account..

So you could do the same for POP but only if you have a Plus account

 

Can you do that with hotmail give us a example please cheer's grate code.

 

 

EDIT: I may invest some time into creating a script that allows you to get message from hotmail without needing the plus account.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.