cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Marutha_K
Frequent Visitor

Send Email Fails

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!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Marutha_K
Frequent Visitor

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.

View solution in original post

4 REPLIES 4
VJR
Super User
Super User

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
Frequent Visitor

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)

Ahammad_Riyaz
Super User
Super User

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.

 

Marutha_K
Frequent Visitor

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.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (3,544)