imap

PHP IMAP retrieve all recipients in To address

荒凉一梦 提交于 2020-01-04 02:52:14
问题 Using PHP IMAP I am able to download all my messages attachments etc from gmail. But when there are multiple recipients in the to address I am only getting a single address. Let me explain it more clearly. Suppose I have an email address example@gmail.com from where I am downloading all the messages. Now when test@gmail.com sends an email to me I am getting example@gmail.com in the toaddress using function imap_headerinfo. But when test@gmail.com sends the mail to example@gmail.com and

How to copy email from Gmail to my server using PHP IMAP?

僤鯓⒐⒋嵵緔 提交于 2020-01-03 06:38:24
问题 How can I copy email from Gmail to my server's /home/email directory after connecting to a Gmail mailbox using PHP's IMAP functionality? I want to retrieve every email as a file in MIME format and I want to download the complete MIME file with PHP, not just the body or header of the email. Because of this, imap_fetchbody and imap_fetchheader can't do the job. Also, it seems imap_mail_copy and imap_mail_move can't do the job because they are designed to copy / move email to mailboxes: imap

MailCore how to delete a message

旧城冷巷雨未停 提交于 2020-01-03 06:26:10
问题 When using MailCore, how do I go about deleting a message? I understand that I set an IMAP deleted flag for a CTCoreMessage but does that actually cause a message to be deleted by the server? Or is there another way to do this? 回答1: First use: - (BOOL)setFlags:(NSUInteger)flags forMessage:(CTCoreMessage *)msg; to set the deleted flag then: - (BOOL)expunge; These are both methods in CTCoreFolder. The tricky part comes from determining if the account is GMail and if the user would rather the

How to fix G1ANT imap not retrieving any emails?

有些话、适合烂在心里 提交于 2020-01-03 03:13:05
问题 I'm trying to get this G1ANT robot to retrieve unread emails from a test email ID, however the retrieved list ♥list has a count of zero even when there are two unread emails. How do I get around this? No error messages are displayed as well. I tried using imap.getemails instead of mail.imap command also, yet it returns the same results. Here is the code for that line: mail.imap imap.getmails host imap.gmail.com port 993 login ♥login password ♥password onlyunreadmessages true sincedate ♥date

Python IMAP4 select mailbox name contain space character, error

余生颓废 提交于 2020-01-03 02:00:15
问题 I am using Python imaplib.IMAP4 to connect to Google email. Every thing is okay except when I use IMAP4.select() method using a mailbox name that contains a space character. Let's say my mailbox name is "Gama Sutra". When I execute imap.select('[Gmail]/Gama Sutra') it gives me this error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/imaplib.py", line 682, in select typ, dat = self._simple

Javamail, IMAP and Kerberos

拜拜、爱过 提交于 2020-01-02 19:28:49
问题 I'm using javamail to check an IMAP inbox, and at the moment I'm simply logging into the IMAP server by storing the username and password. Our security policy at work requires this to be kerberised however. I've been reading up on javamail, IMAP and kerberos, and some resources say it isn't possible, whilst others suggest it is possible. And unfortunately I couldn't find any examples showing how to connect via. kerberos. I was just wondering if anybody could confirm/deny whether it is

Search utf-8 string with Gmail X-GM-RAW IMAP command

允我心安 提交于 2020-01-02 15:14:39
问题 Gmail's imap extension command X-GM-RAW allows me to perform a search if I use a ascii query string. If utf-8 chars are used in the query, the imap returns bad response. https://developers.google.com/google-apps/gmail/imap_extensions#extension_of_the_search_command_x-gm-raw How should the utf-8 input string be encoded so that X-GM-RAW search will work fine. I do not want to loose the flexibility to search specific field like "subject" or "rfc833msgid" Thanks 回答1: Specify CHARSET UTF-8 and

Search utf-8 string with Gmail X-GM-RAW IMAP command

限于喜欢 提交于 2020-01-02 15:14:00
问题 Gmail's imap extension command X-GM-RAW allows me to perform a search if I use a ascii query string. If utf-8 chars are used in the query, the imap returns bad response. https://developers.google.com/google-apps/gmail/imap_extensions#extension_of_the_search_command_x-gm-raw How should the utf-8 input string be encoded so that X-GM-RAW search will work fine. I do not want to loose the flexibility to search specific field like "subject" or "rfc833msgid" Thanks 回答1: Specify CHARSET UTF-8 and

Reading mails on server with IMAP?

笑着哭i 提交于 2020-01-02 09:01:49
问题 I'm setting up an email 'proxy-like' where notification emails are sent to the user that he has subscribed to, but he can reply to the email notification@site.com which should contain his reply. On the server-side I want to be able to read his email and add his reply to the database - the email is stored in the notification user inbox which is great, now to be able to read it with PHP. So, I've been looking around for solutions for this, many solutions were IMAP so I thought I'd give a try

Javamail: can FetchProfile be used when searching mails instead of just fetching them?

点点圈 提交于 2020-01-02 05:17:05
问题 According to http://java.sun.com/products/javamail/javadocs/javax/mail/FetchProfile.html, Message[] msgs = folder.getMessages(); FetchProfile fp = new FetchProfile(); fp.add(FetchProfile.Item.ENVELOPE); folder.fetch(msgs, fp); However, if I want to get only the read messages by using search(), I don't have a means to specify a FetchProfile (as search() doesn't take such a parameter). Folder inbox = store.getFolder("Inbox"); inbox.open(Folder.READ_WRITE); FlagTerm ft = new FlagTerm(new Flags