Bot fails to sent an email neither it throws an exception

Hello Folks,

Using SMTP mail message activity in PROD box . But in one of the execution it fails to send an email neither it throws an exception . Infact the attachment exceeds the size . But doesn’t throws an exception the activities after send email executed normally . Don’t know why . Could anyone suggest please. Thanks in Advance

The size exceeded error is received after the execution of the activity so no error is retrieved. This happens because the server refuses the email only after it was sent.

If you want to make sure the email will be sent you should check the size of the attachments before the execution of the activity. Depending on which client you use there are different limitations. Below are a few examples but you should check for your specific client.

Email client Sending and inbound size limits
Apple Mail (iCloud) 20 MB
Gmail 25 MB
Outlook/Office 365 20 MB (10 MB for Exchange accounts), with up to 150 MB in Office 365
ProtonMail 25 MB
Thunderbird no
Yahoo 25 MB
Zoho Mail 20 MB

Thank you for the reply. Is there any way that the bot can check the size of the file . Could you please suggest

You can assign the result of the function System.IO.FileInfo(“your path here”).Length to a variable.