cancel
Showing results for 
Search instead for 
Did you mean: 

BTP destination configuration to send email using Office 365

Giampaolo
Explorer
0 Kudos

Hi,
I'm trying to send email from a Build Process Automation workflow.

I created sap_process_automation_mail destination as below, but it doesn't work.

Type			MAIL
Proxy Type Internet
Authentication OAuth2Password
User <user_email>
Password <user_pwd>
Client ID <Application ID (client)>
Client Secret <client secret value>
Token Service URL https://login.microsoftonline.com/<Tenant_ID>/oauth2/v2.0/token

- - - ADDITIONAL PROPERTIES - - -
mail.bpm.send.disabled false
mail.smtp.auth true
mail.smtp.auth.mechanisms XOAUTH2
mail.smtp.from <user_email>
mail.smtp.host smtp.office365.com
mail.smtp.port 587
mail.smtp.ssl.checkserveridentity true
mail.smtp.ssl.enable false
mail.smtp.ssl.trust *
mail.smtp.starttls.enable true
mail.smtp.starttls.required true
mail.transport.protocol smtp
scope https://graph.microsoft.com/SMTP.Send

How can i solve?

Thanks in advance,
Giampaolo

View Entire Topic
vbalko-claimate
Active Participant
0 Kudos

Hello,

this one works.

Hope it will help.

Giampaolo
Explorer
0 Kudos

Hi Vladimir, thanks for answer.

Unfortunately Basic Authentication is now deprecated in Office365 and if I try to send emails with the configuration you suggested (and which I use to send emails with gmail) I get this error message.

I'm following this help doc.

Best Regards,
Giampaolo

dominiklang
Explorer
0 Kudos

There's a SAP Note available now:

3451530 - Get error "Sending an email is not possible due to authentication issues" when testing SMTP server in BPA

https://me.sap.com/notes/0003451530

To me it looks like Microsoft applied a few changes and SAP did not update the documentation yet (Configure an SMTP Mail Destination | SAP Help Portal).

Basic Authentication didn't work for me with Microsoft.

I do suggest to use Amazon Simple Email Service (Amazon SES https://docs.aws.amazon.com/ses/ ) with Basic Authentication.