Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/php
- <?
- $host = "{imap.gmail.com:993/imap/ssl}INBOX";
- $pass = "pass";
- $msg = '2';
- $part = '';
- $imap = imap_open($host, $user, $pass) or die( "Couldn't connect to Gmail: ". imap_last_error()."\n");
- $structure = imap_fetchstructure($imap, $msg);
- $attach = imap_fetchbody($imap, $msg, '1');
- echo $attach;
- imap_close($imap);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement