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:
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:
What am missing in the settings? Any help is greatly appreciated. Thank you!
Solved! Go to Solution.
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.
Are you using gmail?
Also what is the complete error? Is there something to scroll to the right for the complete error message?
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)
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.
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.