PHP+Ubuntu Send email using office365Get the solution ↓↓↓
I faced this issue : I used msmtp for sending mail by my VPS with gmail with no problem, and know I try to do the same but with office365 but when I do
echo -e "Subject: Test Mail\r\n\r\nThis is my first test email." |msmtp --debug --from=default -t [email protected] I have this error message :
msmtp: authentication failed (method LOGIN) msmtp: server message: 535 5.7.3 Authentication unsuccessful [A■4■R■7■1■A■042.eurprd07.prod.outlook.com] msmtp: could not send mail (account default from /etc/msmtprc)
Here is my /etc/msmtprc :
GNU nano 4.8 /etc/msmtprc defaults tls on tls_starttls on tls_trust_file /etc/ssl/certs/ca-certificates.crt tls_certcheck on account default host smtp.office365.com port 587 auth on user myoffice365mail password myoffice365mailmdp from myoffice365mail logfile /var/log/msmtp.log
Do you have an idea on what cause the error ? I followed many topic on internet, but I didn't find any solution... Thank you for your time.
Share solution ↓
Link To Answer People are also looking for solutions of the problem: call to a member function format() on string
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.