GmailApp – Add label to specific message, not the thread

You can do this using the GMail API instead. You need to enable the API for your project. In the editor, select Resources > Advanced Google services, then click on “These services must also be enabled in the Google Developers Console.” There, enable the GMail API. modifyMessage Example of use: modifyMessage(‘me’, messageId, [‘stack’,’overflow’]); // add … Read more

PHP mail using Gmail

Gmail’s SMTP-server requires a very specific configuration. From Gmail help: Outgoing Mail (SMTP) Server (requires TLS) – smtp.gmail.com – Use Authentication: Yes – Use STARTTLS: Yes (some clients call this SSL) – Port: 465 or 587 Account Name: your full email address (including @gmail.com) Email Address: your email address ([email protected]) Password: your Gmail password You … Read more

How to send emails with google using nodemailer after Google disabled less sure app option?

At the time of writing, Less Secure Apps is no longer supported by google. And you can’t use your google account password. You’re gonna have to generate a new app password. App passwords only work if 2-step verification is turned on. Follow this steps to get the app password Go to https://myaccount.google.com/security Enable 2FA Create … Read more

“Password not accepted from server: 535 Incorrect authentication data” when sending with GMail and phpMailer

The solution was to enable outgoing SMTP from the server settings. On servers running cPanel’s WHM, this is located under WHM’s “Tweak Settings” section. The option is to enable/disable – choose disable. Caveat: Making this change will redirect outgoing SMTP connections allow accounts to make direct connections which may increase your odds of getting your … Read more

Reading emails from Gmail in C#

Using the library from: https://github.com/pmengal/MailSystem.NET Here is my complete code sample: Email Repository using System.Collections.Generic; using System.Linq; using ActiveUp.Net.Mail; namespace GmailReadImapEmail { public class MailRepository { private Imap4Client client; public MailRepository(string mailServer, int port, bool ssl, string login, string password) { if (ssl) Client.ConnectSsl(mailServer, port); else Client.Connect(mailServer, port); Client.Login(login, password); } public IEnumerable<Message> GetAllMails(string mailBox) … Read more

How to send email using simple SMTP commands via Gmail?

to send over gmail, you need to use an encrypted connection. this is not possible with telnet alone, but you can use tools like openssl either connect using the starttls option in openssl to convert the plain connection to encrypted… openssl s_client -starttls smtp -connect smtp.gmail.com:587 -crlf -ign_eof or connect to a ssl sockect directly… … Read more

How to get the number of unread gmail mails (on android)

Here’s some code snippet. Not sure it works and can’t test it. But I hope it will help you to continue the investigation. public static final class LabelColumns { public static final String CANONICAL_NAME = “canonicalName”; public static final String NAME = “name”; public static final String NUM_CONVERSATIONS = “numConversations”; public static final String NUM_UNREAD_CONVERSATIONS … Read more