web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Send Email Fails

(1) ShareShare
ReportReport
Posted on by 51

I am trying to use "Sen Email" activity for sending email with attachment but it's failing with the below error message. Any help on this appreciated:

Marutha_K_1-1664217119104.png

 

Marutha_K_0-1664217047818.png

1. I have enabled emails to be sent from the server which am using - Firewall is open 

2. Below is the list of settings used in Send Email activity:

Marutha_K_2-1664217274441.png

Marutha_K_3-1664217361109.png

 

What am missing in the settings? Any help is greatly appreciated. Thank you!

 

  • VJR Profile Picture
    7,635 on at

    Are you using gmail?

     

    Also what is the complete error? Is there something to scroll to the right for the complete error message?

    VJR_0-1664251039481.png

     

  • Marutha_K Profile Picture
    51 on at

    Hi @VJR  I am using Office 365 - email for sending email. 

     

    Please see the below error details:

    5.7.1 Unable to relay for abc@xyz.com: Microsoft.Flow.RPA.Desktop.Modules.SDK.ActionException: Failed to send email message. ---> MailKit.Net.Smtp.SmtpCommandException: 5.7.1 Unable to relay for abc@xyz.com
    at MailKit.Net.Smtp.SmtpClient.OnRecipientNotAccepted(MimeMessage message, MailboxAddress mailbox, SmtpResponse response)
    at MailKit.Net.Smtp.SmtpClient.ProcessRcptToResponse(MimeMessage message, MailboxAddress mailbox, SmtpResponse response)
    at MailKit.Net.Smtp.SmtpClient.<FlushCommandQueueAsync>d__62.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MailKit.Net.Smtp.SmtpClient.<SendAsync>d__113.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at MailKit.Net.Smtp.SmtpClient.<SendAsync>d__113.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MailKit.Net.Smtp.SmtpClient.Send(FormatOptions options, MimeMessage message, CancellationToken cancellationToken, ITransferProgress progress)
    at Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.EmailActions.SendEmail(Variant from, Variant senderDisplayName, Variant to, Variant cc, Variant bcc, Variant subject, Variant body, Variant attachments, Variant smtpServer, Variant username, Variant varPassword, Boolean isBodyHtml, Int32 serverPort, Boolean needsAuthentication, Boolean enableSsl, Boolean acceptUntrustedCertificates)
    --- End of inner exception stack trace ---
    at Microsoft.Flow.RPA.Desktop.Modules.Email.Actions.SendEmail.Execute(ActionContext context)
    at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

  • Riyaz_riz11 Profile Picture
    4,219 Super User 2026 Season 2 on at

    Hi @Marutha_K ,

     

    Plz change smtp address smtp.office365.com and port will be 25 or 587.

     

    Regards

    Ahammad Riyaz

    --------------------------------------------------------------------------------
    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

     

  • Verified answer
    Marutha_K Profile Picture
    51 on at

    All the configurations are correct in the Send Email activity but the machine/server from which this flow is running is not allowed to send email. Hence the server IP is whitelisted and allowed to communicate with relay server and then everything perfectly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard