imap

fetch sent emails from gmail imap using nodejs

你说的曾经没有我的故事 提交于 2020-06-29 03:51:08
问题 I'm trying to fetch SENT emails from gmail server using nodemailer through Imap. the solution below is not working and the result is the INBOX not SENT var imap = new Imap({ user: request.body.email, password: request.body.password, host: '{imap.gmail.com:993/imap/ssl}INBOX.Sent', port: 993, tlsOptions: { rejectUnauthorized: false }, tls: true }); 回答1: Take a look on the next links: Special-Use Extension of the LIST command ... * LIST (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail" ... As you

Download attachment from mail using python

淺唱寂寞╮ 提交于 2020-06-28 05:45:16
问题 I have multiple emails that contain an attachment. I would like to download the attachment for unread emails and with a specific subject line. for example, I got an email that has a subject "EXAMPLE" and contains an attachment. So how it would be Below code, I tried but it is not working" it's a Python code #Subject line can be "EXAMPLE" for subject_line in lst_subject_line: # typ, msgs = conn.search(None,'(UNSEEN SUBJECT "' + subject_line + '")') typ, msgs = conn.search(None,'("UNSEEN")')

Download attachment from mail using python

喜夏-厌秋 提交于 2020-06-28 05:45:01
问题 I have multiple emails that contain an attachment. I would like to download the attachment for unread emails and with a specific subject line. for example, I got an email that has a subject "EXAMPLE" and contains an attachment. So how it would be Below code, I tried but it is not working" it's a Python code #Subject line can be "EXAMPLE" for subject_line in lst_subject_line: # typ, msgs = conn.search(None,'(UNSEEN SUBJECT "' + subject_line + '")') typ, msgs = conn.search(None,'("UNSEEN")')

Java email listener

坚强是说给别人听的谎言 提交于 2020-06-16 18:40:55
问题 I came across the IdleManager class and the watch method, which keeps the imap folder open and is in theory watching for new messages, but how do I get it to output or notify when a new email arrives? The code: public static void main(String[] args) throws MessagingException, IOException { IMAPFolder folder = null; Store store = null; String subject = null; Flag flag = null; try { Properties props = System.getProperties(); props.setProperty("mail.store.protocol", "imaps"); props.setProperty(

How to read the body text of an email using ruby's net/imap library?

此生再无相见时 提交于 2020-05-24 11:16:07
问题 Maybe i've just got a bad brain today, but i suddenly can't figure out how to read an email with ruby's net/imap library. I've been at it for several hours. I typed several variations of "ruby imap read body" into google and have explored many sites. All of them have examples on how to pull attachments, sync e-mail servers, work with gmail etc... Some (like chilkat) are actually shareware libraries that do this for you. I have looked at the net/imap documentation and though there are several

SEARCH BEFORE/AFTER with Pythons imaplib

蹲街弑〆低调 提交于 2020-05-23 07:57:09
问题 I have a smaller IMAP-script written i Python(3.2). I my search-line looks like this: typ, data = M.search(None, 'FROM', '"MyName"') I get the expected results. However, if I change it to something like: typ, data = M.search(None, 'AFTER', '"01-Jan-2010"') (with or without quoted date, I get this error Traceback (most recent call last): File "./priv/imap.py", line 100, in <module> main() File "./priv/imap.py", line 93, in main print(to_json(fetch_result(M, args), args)) File "./priv/imap.py",

Errors when installing IMAP extension on official PHP docker image

青春壹個敷衍的年華 提交于 2020-05-14 11:52:21
问题 If you're installing the IMAP extension in your PHP docker image, it's possible that you get some errors like: configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information. and then: configure: error: This c-client library is built with Kerberos support. 回答1: To solve this error: configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log

Office 365 XOAUTH2 for IMAP and SMTP Authentication fails

我的未来我决定 提交于 2020-05-09 12:06:42
问题 Recently the support for OAuth 2.0 for IMAP and SMTP in the Exchange Online has been announced. Following the guide I've set up the application permissions and IMAP and SMTP connection. The application is configured as Accounts in any organizational directory (Any Azure AD directory - Multitenant) and uses authorization code flow. URLs below are used for authorization: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize https://login.microsoftonline.com/organizations/oauth2

Office 365 XOAUTH2 for IMAP and SMTP Authentication fails

一世执手 提交于 2020-05-09 12:05:33
问题 Recently the support for OAuth 2.0 for IMAP and SMTP in the Exchange Online has been announced. Following the guide I've set up the application permissions and IMAP and SMTP connection. The application is configured as Accounts in any organizational directory (Any Azure AD directory - Multitenant) and uses authorization code flow. URLs below are used for authorization: https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize https://login.microsoftonline.com/organizations/oauth2

JavaMail入门第一篇 邮件简介及API概述

你离开我真会死。 提交于 2020-05-08 21:21:28
现如今,电子邮件在我们的生活当中扮演着越来越重要的角色,我们每个人几乎都会与其打交道(至少时不时我们都会接收到莫名其妙的垃圾邮件),在工作中,使用邮件进行交流沟通,可以使我们的工作有迹可循,也显的较为正式,这是由我们人为手工操作的,在生活中,在某网站注册了一个账户之后,该网站就会自动发送一封欢迎邮件并让我们确认是否注册,以防止恶意注册,当然,这个就不可能像我们工作中手工方式来进行操作了,Java的13种核心技术中的JavaMail为我们提供了API来对邮件进行相关的操作。 一、邮件服务器 要在Internet上提供电子邮件功能,必须有专门的电子邮件服务器。Internet上架设了大量的电子邮件服务器,例如,sina.com、qq.com、163.com等网站提供了面向公众免费的电子邮件服务器,许多公司也提供了面向内部员工的电子邮件服务器,这些电子邮件服务器彼此之间都可以发送和接收电子邮件。那邮件服务器的作用是什么呢,它可以帮我们把邮件发出去,也可以帮我们把邮件接收进来,还可以为我们提供取邮件的服务,这个类似于现实生活中的邮局,既可以接收邮件,也可以为我们取邮件提供服务,还可以帮我们发送邮件。下面的图片形象的说明了邮件服务器的功能 (1)接收用户投递的邮件; (2)将用户投递进来的邮件转发给目标邮件服务器; (3)接收其他邮件服务器转发来的邮件并把邮件存储到其管理的用户邮箱中; (4