Developer forum

Forum » CMS - Standard features » Sending emails using outlook.com and STARTTLS

Sending emails using outlook.com and STARTTLS

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

One of our customers is using outloo.com for sending out email.

Outlook does not support SSL by default and it requires STARTTLS instead.

I don't have an option in the interface to select anything else apart from SSL and although the testing says OK, the messages are not sent and I get this error message:

The server response was: 5.7.3 STARTTLS is required to send mail

How should I configure it?

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

STARTTLS is the command the smtp client issues to start a TLS connection. Outlook.com requires TLS connection.

So you should have SSL enabled (which is the same as TLS) and ensure you have the correct port set.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you.

I have tried it out and it works.

Maybe you should consider adding this piece of info on the documentation as there will probably be more outlook.com related projects.

Thank you,
Adrian

 
Nicolai Pedersen
Reply

I thought that was common knowledge.

I have added TLS to the SSL setting to be more clear...

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

It probably is common knowledge for someone working with these all day but for an admin receiving instruction from IT to configure the SMTP without SSL and they only have a checkbox saying "SSL" in most cases they won't check that box.

Thank you for adding it up.


Adrian

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

please make sure if your using outlook or office365 your smtp username and from address should be same...

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Shiwanka,

Yes. I made sure we are using the same values. I know they are pretty sensitive about it.

Thank you,
Adrian

 
Nicolai Pedersen
Reply

Further information related to setup office 365 as SMTP

Recap – screenshots below.

  1. Sender email and account has to be the same email
  2. The user has to setup an app password for the sender account to use for smtp login because of Multi Factor Authentication
    1. To make that possible, the service settings for the entire sender domain has to be changed so users are allowed to create app passwords
    2. The sending user can then create an app password with i.e. the name “Dynamicweb SMTP”
  3. Setup smtp settings with these settings
    1. Server: smtp.office365.com
    2. Port: 587
    3. User name: <user@domain.com> i.e. “np@dynamicweb.dk
    4. Password: the app password created in 2B
    5. SSL: Enabled
    6. Do not use SMTP pickup directory: enabled

 

1 - Sender email and login email has to be the same in order to use office 365 SMTP:

 

So if I want to use my own account to send out emails in DW, I have to change the system email to my account:

 

Alternatively it is possible to setup my account, i.e. np@dynamicweb.dk to be allowed to send emails on behalf of noreply@dynamicweb.dk

 

2: Create an app password:

The domain administrator has to setup the domain to allow users to create app passwords:

 

Setup here: https://account.activedirectory.windowsazure.com/UserManagement/MfaSettings.aspx?BrandContextID=O365

The domain user, or sending user, in my case np@dynamicweb.dk, has to create an app password:

Docs: https://docs.microsoft.com/en-us/azure/active-directory/user-help/multi-factor-authentication-end-user-app-passwords

Set it up here: https://account.activedirectory.windowsazure.com/AppPasswords.aspx

 

3: Setup smtp settings:

Use the app password created above in the password box

 
Gert Janssen
Reply

Hi Nicolai,


Is there also support for OAtuh 2.0? And if so, how can this be setup?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Currently not...

 

You must be logged in to post in the forum