a

How to Send an e-mail with attachment

On this tutorial, Send an e-mail with attachment.

1. Create a new control form application

   

2. Click in New Field

   

3. On quantity type 6 and click in Next.

   

4. Create the fields according to the image below.

   

5. In the application menu click in Blocks from the Layout folder.

   

6. Edit the Main Block .

   

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

   

10. Change the block name and label to Message

11. Click in Create New Block.

12. Enter the values for the attributes Name, Label and Message

   

13. Edit the created blocks properties according to the image below.

   

14. In the application menu click in Select Fields to organize the field according to the table below:

   

Block Field
From name_from
 
To name_to
email_to
 
Message subject
text
file

 

15. Code in the event Onvalidate .

   

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

Untitled Document

Rate this Tutorial
Bad Great
Leave your comments (optional).