imap

Need to save a copy of email using imap php and then can be open in outlook express

浪尽此生 提交于 2019-12-21 06:22:50
问题 I had IMAP PHP script which is connecting and reading emails from the mail box. What i am looking is that i want to save the email on server disk and name it something like testing.eml file. So when later i down those emails and can be viewed in outlook express. Any thoughts how can this be achieved. Thanks, 回答1: See PHP's IMAP reference; here's the core functionality: $mbox = imap_open ("{localhost:993/imap/ssl}INBOX", "user_id", "password"); $message_count = imap_num_msg($mbox); if (

Ruby IMAP IDLE concurrency - how to tackle?

蹲街弑〆低调 提交于 2019-12-20 17:34:09
问题 I'm trying to build a (private, for now) web application that will utilize IMAP IDLE connections to show peoples emails as they arrive. I'm having a hard time figuring out how to hack this together - and how it would fit together with my Heroku RoR server. I've written a basic script for connecting to an IMAP server and idling, looks something like this (simplified): imap = Net::IMAP.new server, port, usessl imap.login username, password imap.select "INBOX" imap.add_response_handler do

python login 163 mail server

妖精的绣舞 提交于 2019-12-20 15:37:07
问题 When I use this script to login the 163 mail server,there is something wrong! My python env is python 2.7.8 Please help me! import imaplib def open_connect(verbose=False): host = 'imap.163.com' port = 993 if verbose:print 'Connecting to',host connection = imaplib.IMAP4_SSL(host) username = 'tmailest@163.com' passwd = 'aaannnmmm' if verbose:print 'Logging in as',username try: connection.login(username,passwd) except Exception as err: print 'ERROR:', err return connection c = open_connect() try

How to generate an XOAUTH parameter using OAuth2.0 for use with Gmail IMAP protocol?

Deadly 提交于 2019-12-20 09:45:53
问题 I have a user authorized to access their gmail through imap using OAuth2.0. I have the OAuth2.0 access token (and refresh token). But I am having trouble figuring out how to map that into an XOAUTH parameter. All the documentation for generating the XOAUTH parameter are written assuming OAuth1.0. I can follow the sample code make this work with OAuth1.0. But my server is using OAuth2.0 for other things and I want to use the same code. 回答1: From my Googling, I don't think it's currently

How to Download all mail with attachments to server using PHP IMAP?

断了今生、忘了曾经 提交于 2019-12-20 08:55:56
问题 Using PHP IMAP function i can read email, but i need to run autoamtically or manually to download messages , how can i download all email messages with or without attachments and saved it to local drive or server in mailid folder name for major networks (gmail,yahoo,hotmail,AOL). 回答1: Please try this code to fetch the email and store attachments in a directory. You can also delete the mail using imap_delete and imap_expunge, after you have fetched it from the mailbox. In the below code set

How to Download all mail with attachments to server using PHP IMAP?

流过昼夜 提交于 2019-12-20 08:54:17
问题 Using PHP IMAP function i can read email, but i need to run autoamtically or manually to download messages , how can i download all email messages with or without attachments and saved it to local drive or server in mailid folder name for major networks (gmail,yahoo,hotmail,AOL). 回答1: Please try this code to fetch the email and store attachments in a directory. You can also delete the mail using imap_delete and imap_expunge, after you have fetched it from the mailbox. In the below code set

How do I enable push-notification for IMAP (Gmail) using Python imaplib?

时光怂恿深爱的人放手 提交于 2019-12-20 08:22:48
问题 Is there a way to monitor a gmail account using imaplib without polling gmail each time I want to see if there is new mail. Or in other words, I just want the script to be notified of a new message so I can process it right away instead of any lag time between polls. I see that the IMAP protocol supports this with the IDLE command, but I can't see anything documented with it in the imaplib docs, so any help with this would be great! 回答1: There isn't something in imaplib that does this, AFAIK

How do I enable push-notification for IMAP (Gmail) using Python imaplib?

可紊 提交于 2019-12-20 08:22:03
问题 Is there a way to monitor a gmail account using imaplib without polling gmail each time I want to see if there is new mail. Or in other words, I just want the script to be notified of a new message so I can process it right away instead of any lag time between polls. I see that the IMAP protocol supports this with the IDLE command, but I can't see anything documented with it in the imaplib docs, so any help with this would be great! 回答1: There isn't something in imaplib that does this, AFAIK

imap: “Unable to create selectable TCP socket” when sending email from a C++ program

北战南征 提交于 2019-12-20 06:57:56
问题 I am trying to send an email from a C++ program using imap library. I have a Google Apps and a Gmail account to which I am sending the email. Whenever the program fails to send an email I am logging the errors to a file. I set my program to run in loop to send the emails. Sometimes, I don't get the emails and when I checked the log file I found out these errors being logged every time sending the email fails. Here is the part of the log file: [2012-04-23 11:04:34] ErrCode:1 ErrMsg:Unable to

imap_open fails giving Unable to create selectable TCP socket

拟墨画扇 提交于 2019-12-20 03:55:19
问题 I have the following code $mbox = imap_open("{mail.mydomain.com:143/imap/notls}INBOX", "newsletter@mydomain.com","xxxxxxx"); if ($mbox) { echo "connected"; imap_close($mbox); } else { echo "not connected :<br>" . imap_last_error(); } It give this output not connected : Unable to create selectable TCP socket (1919 >= 1024) I am able to telnet to the domain, using telnet mail.mydomain.com 443 A LOGIN username password A OK LOGIN Ok What is wrong with my PHP code? 回答1: It appears PHP must be