Support Topics Documentation Slack YouTube Blog

Can't setup smtp under Email Settings for an Office365 email address (i.e. smtp.office365.com)

I paid for email hosting from Go Daddy and they created for me an Office365 account.

I’m now, trying to use this email address in my app’s Email Settings and for my Landing Page’s Contact Us form, but I can’t get it to work.

Has anyone been successful in setting up Email Settings in Backendless to use smtp with Office365 (i.e. smtp.office365.com? When I hit Save or Test, all I get is an error message that says…

“Username and Password are not accepted. Message from smtp server: 535 5.7.3 Authentication unsuccessful [DM3PR08CA0009.namprd08.prod.outlook.com]”

My App id:

572BD0B8-E515-80F5-FF8D-368A517A1E00

Hello @Kevin_Harris.
Did you receive a confirmation letter in the mail?

Regards, Nikita

Yes. I just logged into the account and changed the password on it so someone on Slack could test it out. It worked for him on a test account, but still fails for me.

Here’s the setup that fails for me but actually worked for someone on Slack:

We will try to solve this problem.

Regards, Nikita

Thanks. Keep in mind, he created a new app to do his test, but I’m in a fully setup app that is about to go live.

Amy news on this, or should I try another email hosting service?

@Kevin_Harris, I looked into creating a test account with @office365 and could not figure out how. If you have a test account you could share, it would be greatly help us in reproducing the error.

Regards,
Mark

Sure. The test account being used is one of the images above but here it is:

support@piratebonesapp.com
tempPass2020!

According to the settings info in my Office365 account, the settings to use are:

Server name: smtp.office365.com
Port: 587
Encryption method: STARTTLS

I though the usage of STARTTLS might be the issue but someone on Slack used it and it passed during the Test.

Hi Kevin,

When I tried to login with these credentials, I noticed that office365 detected that the credentials are from GoDaddy and redirected the login there. This means the security domain which does the authentication is with GoDaddy and not with Office365. This would explain why the authentication fails for you, but works for another user who responded on Slack. It would be worthwhile to contact Microsoft support to verify if these email credentials can be used with the Office365 SMTP server.

Regards,
Mark

Ok. I’ve decided to simply deleted this account and start over. What email host is the easiest to setup with Backendless?

The setup on the Backendless side is going to be the same - you have seen the form. I do not think there is an issue directly with Office365, in your particular case, the credentials were not directly from Microsoft though - they were managed by GoDaddy.

Regards,
Mark

I understand. I’m just tired of dealing with GoDaddy on this issue, so is there another services that is known to work?

Any service which support TLS or SSL authentication will work :slight_smile:

GSuite, Office365, Zoho, etc.

Here’s an update. I deleted the Outlook account with GoDaddy and went straight to Microsoft to set it up again and finally got it to work. At least, I could get emails in my new Outlook email account from my landing page’s contact us form. However, when Backendless tried sending out emails (such as for new account creation), they bounced back with this:

550 5.7.708 Access denied, traffic not accepted from this IP

Now, the fix for this was I needed to alter one of my TXT records in my DNS at GoDaddy:

OLD TXT RECORD:
v=spf1 include:spf.protection.outlook.com -all

NEW TXT RECORD:
v=spf1 ip4:66.114.116.4 include:spf.protection.outlook.com -all

They said that 66.114.116.4 was for Backendless but they were uncertain it was static or not.

Does this make sense and will it remain working or eventually break?

Hi Kevin,

Could you please let me know who you’re referring to when you wrote “they said”? What was the specific instructions you received? I wonder where the IP address in question came from.

Regards,
Mark

“They” is Microsoft Tech Support for Office365. Here is the actual chat log concerning the issue:

5/1/2020, 3:53:54 PMKevin
So if I’m understanding correctly, you’re using something called Backendless to send mail to other users on your account?

5/1/2020, 3:55:05 PMMaggie
And those messages are being bounced back?

5/1/2020, 3:55:14 PMMaggie
Yes.

5/1/2020, 3:55:20 PMKevin
I get this: 550 5.7.708 Access denied, traffic not accepted from this IP

5/1/2020, 3:55:46 PMKevin
And Backendless uses your domain correct?

5/1/2020, 3:56:01 PMMaggie
piratebonesapp.com ?

5/1/2020, 3:56:26 PMMaggie
My domain and DNS setup are over with GoDaddy. Backendless is a Mobile Backend as Service provider that runs my database.

5/1/2020, 3:57:10 PMKevin
Does it use your domain to send mail? Meaning, if your users were getting emails as expected it would be from something like info@piratebonesapp.com ?

5/1/2020, 3:58:05 PMMaggie
Yes, users get emails from the email address: support@piratebonesapp.com

5/1/2020, 3:59:06 PMKevin
Okay cool. I’m pretty sure I know what the problem is. When you use a service to send mail with your domain you need to give that service permission to use your domain by adding their IP address or server to your SPF record on your domain.

5/1/2020, 3:59:59 PMMaggie
This is what your SPF record currently is: v=spf1 include:spf.protection.outlook.com -all

5/1/2020, 4:00:18 PMMaggie
I successfully get emails in my new Outlook account when I test the contact us form on the website: http://www.piratebonesapp.com/

5/1/2020, 4:00:22 PMKevin
Do you happen to know if Backendless has an IP address that you can add to your SPF record?

5/1/2020, 4:01:25 PMMaggie
I have no ideal. I could ask them in their support.

5/1/2020, 4:02:06 PMKevin
I’m checking out their website now to see if I can find something.

5/1/2020, 4:02:28 PMMaggie
I don’t see anything so far. In the bounce back email, is there a section of text below the NDR error message that starts with ‘original message headers’ ?

5/1/2020, 4:06:20 PMKevin
l’ll have to login to the support account to get it. Will that disconnect me here?

5/1/2020, 4:07:00 PMKevin
You should be okay if you use an incognito window or a private window.

5/1/2020, 4:07:37 PMMaggie
Ok let me try that.

5/1/2020, 4:07:52 PMKevin
Ok here it is…

5/1/2020, 4:09:40 PMKevin
Diagnostic information for administrators:

Generating server: DM5PR12MB2487.namprd12.prod.outlook.com
test.tokevinharris@gmail.com
Remote Server returned ‘550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653 AS(7171) [DM5PR12MB2439.namprd12.prod.outlook.com]’
Original message headers:

Received: from DM5PR12MB2487.namprd12.prod.outlook.com
([fe80::29e6:ee86:8f25:e2a1]) by DM5PR12MB2487.namprd12.prod.outlook.com
([fe80::29e6:ee86:8f25:e2a1%6]) with mapi id 15.20.2958.027; Fri, 1 May 2020
19:20:35 +0000
MIME-Version: 1.0
Content-Type: text/plain
Date: Fri, 1 May 2020 19:20:35 +0000
Message-ID: 1435053031.1022.1588360834673@bl-taskman-69b844d879-22sqx
Subject: Pirate Bones - New Account Registration

5/1/2020, 4:09:42 PMKevin
Okay great. I was able to get an IP address from that and it looks like it belongs to Backendless so we should be able to add this to your SPF record and then see if it makes a difference.

5/1/2020, 4:14:34 PMMaggie
Cool

5/1/2020, 4:14:45 PMKevin
Give me a moment to format it correctly.

5/1/2020, 4:14:59 PMMaggie
Ok

5/1/2020, 4:15:05 PMKevin
Try editing your record to this: v=spf1 ip4:66.114.116.4 include:spf.protection.outlook.com -all

5/1/2020, 4:16:09 PMMaggie
So, it’s the DNS record of type TXT?

5/1/2020, 4:16:46 PMKevin
Yes

5/1/2020, 4:16:53 PMMaggie
It’s possible they use multiple IP addresses or that it may change over time so you might want to contact them to find out.

5/1/2020, 4:17:19 PMMaggie
Ok. It is changed.

5/1/2020, 4:17:39 PMKevin
I’d like to see if this at least makes a difference for now.

5/1/2020, 4:17:39 PMMaggie
We might need to wait a few minutes for it to be published but GoDaddy is usually pretty quick.

5/1/2020, 4:18:10 PMMaggie
Ok

5/1/2020, 4:18:18 PMKevin
Oh wow that was really fast, it’s already done.

5/1/2020, 4:18:50 PMMaggie
Can you test it for me?

5/1/2020, 4:18:55 PMMaggie
Yes. Hang on.

5/1/2020, 4:19:05 PMKevin
Yes. It worked that time!

5/1/2020, 4:21:55 PMMaggie
Would you like me to send you an email so you can reach me in case something else comes up in the next few days?

5/1/2020, 4:22:21 PMMaggie
Sure and I will contact Backendless about this issue.

5/1/2020, 4:23:10 PMKevin
Interesting, okay. I would let them know what we did to make it work and ask if that IP address is static or not.

5/1/2020, 4:23:54 PMMaggie
Ok

5/1/2020, 4:24:07 PMKevin
I got the IP address as the originating IP for the email from the message headers and then I did a reverse IP address lookup to confirm it was theirs.