muquit / mailsend

A program to send mail via SMTP from command line
Other
294 stars 68 forks source link

Help needed to send mail via smtp.gmail.com #80

Open Pio55 opened 8 years ago

Pio55 commented 8 years ago

Hi, many thanks for your work... I need help, because I'm quite sure I've followed this example to send my email through smtp.gmail.com: https://github.com/muquit/mailsend/blob/master/doc/examples.mediawiki#starttls--authentication Nevertheless, I receive this error (I paste the last lines of the verbose output):

[S] 535-5.7.8 Username and Password not accepted. Learn more at Error: AUTH LOGIN failed: '535 5.7.8 Username and Password not accepted. Learn m ore at' Could not send mail

I'm quite sure username and password used to authenticate to smtp.gmail.com are correct. I'm able to send mail for this gmail account, both from Gmail webmail, and from THunderbird. Can anyone help me ?

muquit commented 8 years ago

Do you have 2-factor authentication enabled in gmail? If so, you've to configure 2-factor auth for mailsend as per google's instructions. Also if you are using it on Windows, make sure to use double quotes around parameters.