Check if email has been sent and retry it if the mail wasn't sent

Hello,

I have a simple workflow in which I go through an excel file and then send an email with the excel file.

I would like to know if there is a way to check whether the email has been sent out or not, like a boolean variable.
Indeed, the mail process is sometimes blocked and the mail sending activity never finishes.

I thought about using a retry scope to resend the mail in case it hasn’t been sent yet. But how can we detect that and implement it as simple as possible?

Need your help guys ! :frowning:
Thank you !

1 Like

@WilliamC finally use message box to ur convenient (For Checking whether the mail send or not) & In mail sending R u provide all of the details properly in SMTP mail msg? (With property panel that contains port num, password etc) gave them properly

Regards Nandhu.

hi @WilliamC use try catch block… inwhich if the mail isn’t sent means then it throws an exception…
hpy learning :grinning:

Hi
Hope these steps would help you resolve this
—keep the SEND OUTLOOK MAIL ACTIVITY inside the TRY block of TRY CATCH Activity
So that if that doesn’t throw any error it will surely send the mail
Or
If it’s throws any exception it will go to CATCH Block where choose the exception as system.exception and we can again use a SEND OUTLOOK MAIL activity

And may I kNow what error we are getting on sending mail

Cheers @WilliamC

Thank you for your response ! I will try this and let you know how it is working
The funny thing is that no error appears, it just never stops and the mail has not been sent. I tried to use retry scope but I didn’t know how to get the boolean variable that could indicate whether the mail is sent.

Anyway thanks

1 Like

Hi, have you found a solution to that problem? I have the same issue

Hello !

Actually I didn’t manage to find a solution for this issue. Instead I just replaced my send SMTP message by send outlook message.

I think outlook message are more stable if you have it configured on your PC.

Hope it could help you.

Hi thanks for your quick answer, actually I figured out that also and I did same as you, but still, it worked once perfectly, but now, after 2 emails it seems to be blocked, no error, nothing happens, that’s strange

Hi,
In case of SMTP mail service make sure that the port no and the server address are relevant also check you mail id and password. After doing this your message will not be sent because you email provide will block the robot access to your email id and probably you will get a alert mail from your email provider, to resolve this you have to go to your email security setting and turn your less secure button on. You will be able to send the mail.

To check whether your mail sent or not just enclose that with try and catch block and in catch block handle system.exception, and after the SMTP activity add one message box and show “Mail sent successfully”

Hope this will help you. :grinning: