server - MSMTP Gmail, username and password incorrect - Ask Ubuntu


i trying send emails using php mail(); function. have installed msmtp allow me use gmail account. whenever try send test email using msmtp destination email, system freezed , cannot write more commands.

this contents of ~/.msmtprc:

account gmail tls on tls_starttls on tls_certcheck off auth on logfile ~/.msmtp.log host smtp.gmail.com port 587 user ****@gmail.com ****@gmail.com password **********  account default : gmail 

also when work, error says bad credentials though details correct, access less secure apps on , there no 2-step verification.

if allowing less secure app doesn't work, should consider 2fa.

here working configuration:

account default host smtp.gmail.com           port 587                      "yourusername@gmail.com"    tls on                        tls_starttls on               tls_trust_file /etc/ssl/certs/ca-certificates.crt auth on                      user "yourusername"        password "yourapppassword"        logfile ~/.msmtp.log 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User