Issue using SmptClient extension

Hi everyone,
I need my app to send an email to a certain address, and I’m doing this with the SmptClient extension (found here thanks to Taifun’s recommendation).

Here are my blocks:

As you can see, once the app initializes it opens screen 1 and I need to check if the email has been sent correctly: if so, the app needs to store a value in a db and open screen 2, if not it needs to close and reopen screen 1.

Now, the smtp client extension works perfectly when I send the email with correct user and password (I receive the emails with all the data), but if I put on purpose the wrong password I would expect to get an error message and the app to do what is contained in the “when smptclient got error” block, but it is not happening: whether the email is sent or not, the app goes to screen 2 and doesn’t show screen 1 as if it received a successful message from the smpt client extension.

How could I solve this issue?

Hope my question is clear and thank you all for the help!

Looks like you missed:

thanks @vknow360, I definitely didn’t see it.
I’m sorry but I don’t get what you mean with “Both the events are triggered if any error occurs so what’s happening with your app is likely to happen”. Do you mean that I need to change my blocks?
Thank you!

Wrap marked blocks inside an If statement and proceed only if successful is true.

1 Like

Thanks @vknow360 for the answer… I tried to change the blocks as follows:

Unfortunately it doesn’t work and I don’t know how to set it in another way with the blocks I have available!

Thank you

Replace if true with if get succesful then … else …

Thank you @dora_paz, it works now!!
And thank you @vknow360 for the help!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.