Email confirmation


#1

Hello everyone,
I would like to know how to set up an email send confirmation in Wappler.


#2

Hello Andre,
What do you need to send and when?

Anyway It’s as easy as just adding the send mail step to your server action and add your content inside.


#3

I have a form and i need to get a confirmation text after the form is successfully sent.


#4

Andre, Docs are your best friend:

Just follow this tutorial and add the steps shown there to your existing server action …
NOTE: You can have more than one send mail step - so it sends one email to you, and another to the customer, if needed :slight_smile:


#5

Teodor, i already checked that documentation, but it only have a reset.
I need a confirmation text after someone successfully send the form.


#6

Do you just want to show a notification after the mail is sent??


#7

Yes!


#8

#9

Is not working Teodor, is that because i already had a reset action?

http://surfingsilvercoast.com/new/booknow.html


#10

No, it is because !!as explained in the docs!! you have to wrap static text you enter in notifications in single quotes:

'Thank you for your choice! During the next 24 hours we'll reply to your email with all the necessary information to complete your booking.'


#11

Its not just that,
is still not working.


#12

That’s because of the single quote used in the text. It must be escaped.

'Thank you for your choice! During the next 24 hours we\'ll reply to your email with all the necessary information to complete your booking.'


#13

Yap, it was that. It works now!!!


#14

Teodor,
The guys asked me for an alternative to this notification. They prefer after they click the send button, the all form should disapear and apear a message instead of the form.

How can i do it?
I already tried with the dynamics attributes - hide/show but it didn’t work.

I created a row:

18

and added:

33

But then, i only have these options:

15

and didnt work like this


#15

Use dynamic attributes > hide for the form, and dynamic attributes > show for the success message. You want to show/hide them after the server action executes and the status is 200 OK (the server action form status).
So just use this expression for both:


#16

@Teodor,
status ==200 It is like doing on server connect success ?


#17

Yes, when the form is successfully sent, the status will be 200.