I am trying to send SMTP email from the Linux mailx command; however, no matter how I try, the return from the server is always Authentication unsuccessful.
- Setup connector in Office 365 exchange to add my public IP addresses as trust
- Setup an Office 365 account with an Essential subscription
- Allow incoming & outgoing SMTP traffic over port 25 and 587 on my firewall for all Office365's IP addresses
I tried to run:
mailx -v -s "Now is `date`" \
-S smtp-use-starttls \
-S ssl-verify=ignore \
-S smtp-auth=login \
-S smtp=smtp://smtp.office365.com:25 \
-S from="firstname.lastname@example.org" \
-S smtp-auth-user="email@example.com" \
-S smtp-auth-password="password" \
-S ssl-verify=ignore \
And I always get the return below from the Office365 server.
535 5.7.3 Authentication unsuccessful [YQBPR0101CA0032.CANPRD01.PROD.OUTLOOK.COM]
smtp-server: 535 5.7.3 Authentication unsuccessful [YQBPR0101CA0032.CANPRD01.PROD.OUTLOOK.COM]
. . . message not sent.
I tried to change the following variables:
- Substitute smtp.office365.com with resolved IP address
- Port 25 with port 587
- Substitute smtp-auth-user="firstname.lastname@example.org" with smtp-auth-user="mydomain.com\myname"
Is there anyone successfully manage to get mailx working with Office365 SMTP?
Solved! Solved! Go to Solution.
This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.
As you’ll notice, your Topic is now in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.
Be sure to click Accept as Solution to mark helpful posts to help other users locate important info. Also, don't forget to give Kudos for great content!
This is a new issue for me (perhaps just coincidental - following a recent OS upgrade from Windows 10 Home to Windows 10 Pro). An Windows 10 OS patch for January 2020 that I just installed also solved one other mail related issue for me that had popped up unexpectedly since last week. Would you please explain the solution you're referring to in simple "layman's English" - that is, without using too much technical lingo? More specifically, what are all the steps required to request for IP and domain white listing in the Spamhaus? For reference, I am simply trying to send automated email messages using a Python program (which worked beautifully and perfectly up until my OS switch/upgrade to Windows 10 Pro) but apparently the email server is no longer recognizing my Hotmail / Outlook email account credentials. It's become a major headache for what I am trying to accomplish, especially after spending many hours/days to successfully figure out the programmatic email solution just days before the OS switch/upgrade. Your timely help will be greatly appreciated. Please note that I am not a naturally techie person but learning new things everyday. So simpler explanation in plain English is preferred. Sincere thanks in advance. R
The following answer helped me out in resolving my issue.On the contrary
I have another query in this regard that I am going through a problem that whenever
I am going ahead and trying to sign in to a Microsoft cloud service such as Office 365,
Microsoft Azure I am getting the following error message from
ADFS that "There was a problem accessing the site. Try to browse to the site again."I have contacted
the help desk and followed out their guidelines as told office 365 login .Suggest us if anything
I have missed out.