gmail

Invalid value for ByteString error when calling gmail send API with base64 encoded < or >

為{幸葍}努か 提交于 2019-11-30 00:36:31
问题 Really stuck on this one and pulling my hair out trying to figure out what to do, searched everywhere and tried everything but still stuck. Any help is much appreciated. So I am calling the Gmail send message API: https://www.googleapis.com/gmail/v1/users/me/messages/send I pass in the following base64 encoded raw message:

send mail via SMTP Gmail Oauth2 issue

泄露秘密 提交于 2019-11-30 00:09:10
问题 I can authenticated to SMTP by following the google example. But the problem now is I can't send out the mail. I am getting the following error whenever I try to send out mail. com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 f5sm19578172pav.22 at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2114) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java

Right way to poll GMail inbox for incoming mail from stand-alone application

感情迁移 提交于 2019-11-29 23:31:18
问题 I am trying to poll GMail inbox for incoming mail. Here is what I have: import java.util.Properties; import javax.mail.Authenticator; import javax.mail.Folder; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.event.MessageCountEvent; import javax.mail.event.MessageCountListener; import com.sun.mail.imap.IMAPFolder; import com.sun.mail.imap.IMAPStore; public class GmailIncomingTest { public

SwiftMailer + Gmail - Cannot send email

为君一笑 提交于 2019-11-29 23:29:08
问题 I can't connect with Gmail SMTP server. Look: $transport = Swift_SmtpTransport::newInstance() ->setHost('smtp.gmail.com') ->setPort(465) ->setEncryption('ssl') ->setUsername('email@gmail.com') ->setPassword('mypasss'); $mailer = Swift_Mailer::newInstance($transport); $message = Swift_Message::newInstance('Contato via Site') ->setFrom(array($email => $de)) ->setTo(array($destinatario => 'Agência Linka')) ->setBody($corpo_mensagem, 'text/html') ->setCharset('UTF-8'); $mailer->send($message);

smtplib and gmail - python script problems

醉酒当歌 提交于 2019-11-29 23:00:45
Here's my script: #!/usr/bin/python import smtplib msg = 'Hello world.' server = smtplib.SMTP('smtp.gmail.com',587) #port 465 or 587 server.ehlo() server.starttls() server.ehlo() server.login('myname@gmail.com','mypass') server.sendmail('myname@gmail.com','somename@somewhere.com',msg) server.close() I'm just trying to send an email from my gmail account. The script uses starttls because of gmail's requirement. I've tried this on two web hosts, 1and1 and webfaction. 1and1 gives me a 'connection refused' error and webfaction reports no error but just doesn't send the email. I can't see anything

Subscriber email: GMail is converting height to min-height

浪尽此生 提交于 2019-11-29 22:59:21
This is a seemingly known issue when delivering email to Google users: Google changes any "height" declarations to "min-height". This means that images that are stacked no longer "touch" each other without a gap. Does anyone know of a good work around? Here's an example: <div style="height:244px"> <img src="http://www.domain.com/images/top.gif" alt="" /> </div> <div style="height:266px"> <img src="http://www.domain.com/images/bottom.gif" alt="" /> </div> Appears as the following in GMail: <div style="min-height:244px"> <img src="http://www.domain.com/images/top.gif" alt="" /> </div> <div style

Creating messages (ie drafts) in Gmail with IMAP/SMTP?

喜欢而已 提交于 2019-11-29 22:40:21
I've done quite a bit of inbox manipulation with Gmail via IMAP functions in PHP, but one thing I haven't found is a way to create messages. I'm not sure if IMAP or SMTP is required, but I would like to use PHP to create a new message (specifically a draft) that is stored in my inbox with everything ready to hit send at a later date. How do I go about this? You might want to look at imap_mail_compose() Edit This doesn't create the message on the server. You need to use imap_append() also. Further Edit This seems to work ok: <?php $rootMailBox = "{imap.gmail.com:993/imap/ssl}"; $draftsMailBox =

Need help optimizing a google apps script that labels emails

痞子三分冷 提交于 2019-11-29 21:57:40
Gmail has a issue where conversation labels are not applied to new messages that arrive in the conversation thread. issue details here We found a Google Apps Script that fixes the labels on individual messages in the Gmail Inbox to address this issue. The script is as follows: function relabeller() { var labels = GmailApp.getUserLabels(); for (var i = 0; i < labels.length; i++) { Logger.log("label: " + i + " " + labels[i].getName()); var threads = labels[i].getThreads(0,100); for (var j = 1; threads.length > 0; j++) { Logger.log( (j - 1) * 100 + threads.length); labels[i].addToThreads(threads)

How to get rid of “Show trimmed content” in GMail HTML emails?

痴心易碎 提交于 2019-11-29 20:51:12
I send a lot of HTML emails. The problem with GMail is, if there are more than one emails with the same subject, it hides some similar content and shows a "..." to show the "trimmed content". This screws up with my formatting. If changing the subject is not an option, is there is any way to avoid this behaviour? Edit: I should clarify that I programmatically send emails using Amazon SES from a php script. That is why I posted the question in Stack Overflow. I've just encountered this problem myself, and from my investigations it seems that GMail does indeed trim the content if it is similar to

Why is Gmail blocking CSS in emails?

和自甴很熟 提交于 2019-11-29 20:25:58
I used CSS in my email and sent it out. When I received the email in Gmail, all the CSS was disabled; however, when I retrieved the email in thunderbird or outlook, everything is OK. How would I fix this? Gmail doesn't block CSS totally. It still supports inline style. Why doesnt it support style block, I've no idea. To have a good overview of CSS support in various webmail and email clients, here's a good one. http://www.campaignmonitor.com/css/ Stylesheets are one of many, many HTML features that are often blocked by webmail providers. HTML mail is a world of hurt and it's not going to get