On this tutorial, Send an email using the macro sc_mail_send.
1- Create a new control form application
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2020/10/sc2-3-1024x348.png)
2- Click in New Field.
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2020/10/sc6-3.png)
3- On quantity type 5 and click in Next.
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2016/06/sc2.png)
4- Create the fields according to the image below.
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2016/06/sc3-1.png)
5- In the application menu click in Blocks from the Layout folder.
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2020/10/sc6-7.png)
6- Edit theMain Block.
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2016/06/sc5.png)
7- Change the block name and label to To
8- Click in Create New Block.
9- Enter the values for the attributes Name, Label and To
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2016/06/sc6.png)
10- Change the block name and label to Mensagem
11- Click in Create New Block.
12- Enter the values for the attributes Name, Label and Mensagem
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2016/06/sc7.png)
13- Edit the created blocks properties according to the image below.
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2016/06/sc9.png)
14- In the application menu click in Select Fields to organize the field according to the table below:
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2020/10/sc3.png)
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2016/06/sc8.png)
Bloco | Campo |
---|---|
From | name_from |
To | name_to |
email_to | |
Message | subject |
text |
15- Code in the event OnValidate .
![](http://www.scriptcase.net/tutorials/wordpress/wp-content/uploads/2020/11/sc9.png)
sc_mail_send(smtp, usr, pw, from, to, subject, message, mens_type, copies, copies_type, port, connection_type, attachment)
Atributes | |
---|---|
smtp | SMTP server address |
usr | SMTP server user |
pw | SMTP server password |
from | e-mail from – sender |
to | e-mail destination, can be a string or variable containing an e-mail, or a variable containing an e-mail array. |
Subject | Message title |
Message | Message to be sent |
Type | text message type to be sent: “T” for only text or “H” for text and/or html |
copies | e-mail recipient list (optional), can be a string or variable containing one or more e-mails, separated by “;”, or a variable containing an array of e-mails |
Comment this post