I am using msmtp to sent emails but getting authentication error although my login credentials were right.
my msmtprc file contains
defaults
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
account default
host smtp.gmail.com
port 25
auth on
user *******@gmail.com
password *********
from **********@gmail.com
logfile /var/log/msmtp.log
on running this command on terminal
echo -e "Subject: Test Mail\r\n\r\nThis is my first test email." |msmtp --debug --from=default -t vikrantgoutam16@gmail.com
I get the following errors
msmtp: authentication failed (method PLAIN)
msmtp: server message: 535-5.7.8 Username and Password not accepted. Learn more at
msmtp: server message: 535 5.7.8 https://support.google.com/mail/?p=BadCredentials b14sm68898705pfi.92 - gsmtp msmtp: could not send mail (account default from /etc/msmtprc)