Skip to main content
Solved

Azure SMTP configuration

  • October 13, 2020
  • 3 replies
  • 402 views

mperrott
Hero
Forum|alt.badge.img+12

We have setup the SMTP on our Azure Acceptance env with all the required information, however we fail to send an email from our Azure AD user using the O365 smtp. 

O365 configuration:

SMTP Host: smtp.office365.com
SMTP Port: 587
SSL Protocol: OFF
TLS Protocol: ON

Indicium configuration with SSL ON:

 "Email": {
            "TwoFactorEmailMessageService": "TSFSmtpMessageService",
            "SmtpServer": "smtp.office365.com",
            "SmtpPort": 587,
            "UseSSL": true,
            "SmtpEnableSsl": "Yes",
            "SmtpUsername": "notificationsuat@hartmannship.onmicrosoft.com",
            "SmtpPassword": "*******",
            "SmtpFrom": "notificationsuat@hartmannship.onmicrosoft.com",
              "SmtpFromDisplayName": "UAT Notifications",
            "DefaultPasswordResetTemplate": {
                  "FromEmail": "notificationsuat@hartmannship.onmicrosoft.com",
                  "FromDisplay": "UAT Reset Password",
                  "Title": "Password reset token",
                  "Body": "Your password reset token is <b>{resetToken}</b>."
                }
        }

Error 1 with above config: 2020-10-13T06:54:08.4273543+00:00 0HM3EN17KKVMK:00000001 [ERR] System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [AM0PR02CA0002.eurprd02.prod.outlook.com] 

Indicium configuration with SSL OFF:

 "Email": {
            "TwoFactorEmailMessageService": "TSFSmtpMessageService",
            "SmtpServer": "smtp.office365.com",
            "SmtpPort": 587,
            "UseSSL": false,
            "SmtpEnableSsl": "No",
            "SmtpUsername": "notificationsuat@hartmannship.onmicrosoft.com",
            "SmtpPassword": "*******",
            "SmtpFrom": "notificationsuat@hartmannship.onmicrosoft.com",
              "SmtpFromDisplayName": "UAT Notifications",
            "DefaultPasswordResetTemplate": {
                  "FromEmail": "notificationsuat@hartmannship.onmicrosoft.com",
                  "FromDisplay": "UAT Reset Password",
                  "Title": "Password reset token",
                  "Body": "Your password reset token is <b>{resetToken}</b>."
                }
        }

Error 2 with above config: 2020-10-13T06:58:33.3732869+00:00 0HM3F8L7PVBFM:00000005 [ERR] System.Net.Mail.SmtpException: Error in processing. The server response was: 5.7.3 STARTTLS is required to send mail [AM6PR10CA0102.EURPRD10.PROD.OUTLOOK.COM]

 

Question: How do we configure the TLS if it is ON or OFF in the SMTP settings of Indicium? What are we missing ?

Best answer by Jasper

Hi mperrott, 

The problem here is probably that Azure blocks outbound email messages sent from any service in Azure that doesn’t use an authenticated SMTP relay service, to protect Azure data center IP addresses from reputation abuse.

The most common SMTP relay service that is integrated with Microsoft Azure is SendGrid, which is free for up to 25,000 emails per month. The SendGrid SMTP API allows you to send emails using the Thinkwise SMTP connector, but you could also use the Web API with the Thinkwise HTTP connector.

Instructions on how to setup SendGrid in Azure and send emails using SMTP can be found here and here, for example. Please consult the SendGrid documentation for more information. 

 

 

View original
This topic has been closed for comments

Jasper
Superhero
  • October 13, 2020

Hi mperrott, 

The problem here is probably that Azure blocks outbound email messages sent from any service in Azure that doesn’t use an authenticated SMTP relay service, to protect Azure data center IP addresses from reputation abuse.

The most common SMTP relay service that is integrated with Microsoft Azure is SendGrid, which is free for up to 25,000 emails per month. The SendGrid SMTP API allows you to send emails using the Thinkwise SMTP connector, but you could also use the Web API with the Thinkwise HTTP connector.

Instructions on how to setup SendGrid in Azure and send emails using SMTP can be found here and here, for example. Please consult the SendGrid documentation for more information. 

 

 


mperrott
Hero
Forum|alt.badge.img+12
  • Hero
  • October 19, 2020

Thank you Jasper,

We have tested with SendGrid service and it is working as expected.


Jasper
Superhero
  • October 19, 2020

Great, thanks for the heads up!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings