How to send an email using python after Google’s policy update on not allowing just username and password?

Here is a more precise answer with all the main steps. I hope it will help other people. Log in into your email account: https://myaccount.google.com Then go to the security part Be sure that you have turn on two steps verification and click on “App password” After select email and the corresponding device It will … Read more

Google Apps Script – Gmail, delete forever e-mails in trash with specific label

@karan’s answer already points to the solution which worked for me, but being inexperienced / not-a-professional-developer, it took me a little work to translate it into a working solution to the original question. Here’s a concise description of the steps I used to perform this task: Create the following function in my script: function deleteForever(userId, … Read more

Nodemailer/Gmail – What exactly is a refresh token and how do I get one?

Notes by this answer original’s author: So, I finally managed to figure it out. I’m surprised I couldn’t find more ressources about that so for those who need to use Gmail with Nodemailer I found the answer here: http://masashi-k.blogspot.fr/2013/06/sending-mail-with-gmail-using-xoauth2.html Try creating a new User if you already had one and things ain’t working fine. It … Read more

How can I shift-select multiple checkboxes like GMail?

I wrote a self-contained demo that uses jquery: $(document).ready(function() { var $chkboxes = $(‘.chkbox’); var lastChecked = null; $chkboxes.click(function(e) { if (!lastChecked) { lastChecked = this; return; } if (e.shiftKey) { var start = $chkboxes.index(this); var end = $chkboxes.index(lastChecked); $chkboxes.slice(Math.min(start,end), Math.max(start,end)+ 1).prop(‘checked’, lastChecked.checked); } lastChecked = this; }); }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> <html> <head> </head> <body> … Read more

Sending email fails when two factor authentication is on for Gmail

Create a custom app in you Gmail security settings. Log-in into Gmail with your account Navigate to https://security.google.com/settings/security/apppasswords In ‘select app’ choose ‘custom’, give it an arbitrary name and press generate It will give you 16 chars token. Use the token as password in combination with your full Gmail account and two factor authentication will … Read more