gmail

How to retrieve gmail sub-folders/labels using POP3?

有些话、适合烂在心里 提交于 2019-12-01 09:34:55
The code below uses javamail API to access gmail, String host = "pop.gmail.com"; int port = 995; Properties properties = new Properties(); properties.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); final javax.mail.Session session = javax.mail.Session.getInstance(properties); store = session.getStore("pop3s"); store.connect(host, port, mCredentialaNme, mCredentialApss); // *************************************************************** Folder personalFolders[] = store.getDefaultFolder().list( "*" ); // *************************************************************** for

Python IMAP search using a subject encoded with utf-8

依然范特西╮ 提交于 2019-12-01 09:16:05
This question is related to question Python IMAP search using a subject encoded with iso-8859-1 , but the reply given there is not working for me. I am doing the following IMAP search in python: typ, data = self.M.search("utf-8", "(SUBJECT %s)" % u"réception".encode("utf-8")) And I get the following exception: ... typ, data = self.M.search("utf-8", "(SUBJECT %s)" % u"réception".encode("utf-8")) File "/usr/local/python/2.7.2/lib/python2.7/imaplib.py", line 625, in search typ, dat = self._simple_command(name, 'CHARSET', charset, *criteria) File "/usr/local/python/2.7.2/lib/python2.7/imaplib.py",

phpMailer gmail spam

限于喜欢 提交于 2019-12-01 08:57:03
问题 I use phpMailer, but I have a problem: when the recipient is Gmail or Yahoo my email ends up in the spam folder. How is it possible? The code is this: $mail->AddCustomHeader('Reply-to:info@myemal.com'); $mail->From="info@myemal.com"; $mail->FromName="MY NAME"; $mail->IsSendmail(); $mail->AddReplyTo("info@myemail.com"); $mail->From = 'info@myemail.com'; $mail->FromName = 'My name'; $mail->AddAddress($to, $toName); $mail->Subject = $subject; $mail->AltBody = "To view the message, please use an

Email Attempt Failed when signin through PHP in gmail

六月ゝ 毕业季﹏ 提交于 2019-12-01 08:51:02
I need a help in email sending in PHP. Am actually trying to send email using PHP mailer. Somehow for some of the mail ids am able to send the email but for some other email ids am unable to send. I receive an email in gmail stating 'Signin attempt prevented.' Can somebody help me know where do I need to change the settings in my gmail account in order to make my PHP code to send emails? require("phpmailer/class.PHPMailer.php"); require("phpmailer/class.smtp.php"); $f_pointer=fopen("test.csv","r"); // file pointer $emails = array(); while (($data = fgetcsv($f_pointer, 1000, ",")) !== FALSE) {

GMailApp Gmail search

瘦欲@ 提交于 2019-12-01 08:33:22
问题 I have a problem with the GmailApp search(query) function. According to the manual it uses Gmail queries, so all the arguments should be accessible and return correct results. This is my query: var sent_threads = GmailApp.search('in:sent after:2016/02/29'); Logger.log(sent_threads.length); // This one prints 21 for (var i = 0; i < sent_threads.length; i++) { var message = sent_threads[i].getMessages()[0]; var recipient = message.getTo(); Logger.log(recipient); // This one prints 21 email

Creating a Gmail Draft with Recipients through Gmail API

孤人 提交于 2019-12-01 08:29:16
问题 I have been trying to figure out how to automatically add recipients to a Draft email that is created using the Gmail API through their Ruby library. I can create the draft without any issues but setting the recipients is causing me troubles and I haven't been able to find any good examples showing the best way to add email specific things. Using the Google API playground and pulling in drafts that have already been created, it looks like the structure should be something similar to what is

Email Attempt Failed when signin through PHP in gmail

假如想象 提交于 2019-12-01 07:18:11
问题 I need a help in email sending in PHP. Am actually trying to send email using PHP mailer. Somehow for some of the mail ids am able to send the email but for some other email ids am unable to send. I receive an email in gmail stating 'Signin attempt prevented.' Can somebody help me know where do I need to change the settings in my gmail account in order to make my PHP code to send emails? require("phpmailer/class.PHPMailer.php"); require("phpmailer/class.smtp.php"); $f_pointer=fopen("test.csv"

Did Android Gmail 4.2.1 break html intents? [closed]

Deadly 提交于 2019-12-01 07:17:50
I've been using Intents to send HTML formatted emails using Gmail on Android from other apps. Today they stopped working. They look good in the Gmail compose display but all of the HTML tags get stripped when Gmail sends the email. I've tried every variation of Intent formatting that I've seen posted and all HTML is stripped away. The result is always a multipart/alternative with a plain text and an HTML section containing an HTML-ized version of the plain text. Is anyone else seeing this? Any ideas for a work-around? 来源: https://stackoverflow.com/questions/13712454/did-android-gmail-4-2-1

Javamail and Gmail Pop3 SSL

喜夏-厌秋 提交于 2019-12-01 06:50:43
i'm trying to connect my app to Gmail to check emails. I must use SSL for POP3. This is my code: Properties props = new Properties(); props.put("mail.host", "pop.gmail.com"); props.put("mail.store.protocol", "pop3s"); props.put("mail.pop3s.auth", "true"); props.put("mail.pop3s.port", "993"); Session session = Session.getDefaultInstance(props, null); Store store=session.getStore(); store.connect("myuser@gmail.com","mypass"); And I get this error: Exception in thread "main" javax.mail.MessagingException: Connect failed; nested exception is: java.io.IOException: Unexpected response: * OK Gimap

Gmail POP3 not getting all messages in Java application

余生长醉 提交于 2019-12-01 06:41:52
I have enabled POP3 settings for my gmail. I am able to connect to the POP3 store using my password in a Java app. I have around 10k messages in my inbox. When I call getMessages on the Inbox folder it returns only 280 old messages. When I call getMessages in a loop, every call returns me same messages. I also tried getMessages(start, end) but it does not return other messages than those 280. How do I retrieve the other messages? By default, GMail's POP3 and IMAP server does not behave like standard POP3 or IMAP servers and hides messages from clients using those protocols (as well as having