Email Sending Action

Top  Previous  Next

Process email-templates and send emails.

Parameter:  Path to the template file.

Example:

email = ../somedir/email.txt

Email-templates should have the following format:

 

To: recepient@somehost.com
From: sender@somehost.com
Subject: This is an email subject
 
This is an email body.

 

 

Note:
There is an empty line before email body and no empty lines between headers.

So, first of all you have to set correct headers. The required headers are - “To:”, “From:” and “Subject”. Additionally you can add:

Cc: - carbon copy

Bcc: - blind carbon copy

Format: - sets email format, HTML or plain (plain by default)

Charset: - sets email charset (ISO-8851, UTF-8, etc)

Attachment: {#user-file#} - if you want user to attach file via the form. In this case "user-file" should be an upload field name from your form.

Attachment: - file name to attach with corresponding path. Note, all paths should be provided relatively to Form Processor Pro directory or absolutely.

Examples:

Attachment: /path/to/file.zip

-or-

Attachment: ../myform/test.zip

For properly mail contents display, same charsets need to be used both in html pages and in mail templates.

Email templates will be parsed as a usual template and you may use all parser features. Also, you may separate by comma multiple recipients or attachments

Example of the email template:

 

To: {#email#}

From: user@domain.com

Subject: Your data was successfully added to database

 

Dear {#name#},

Thank you for filling out our form.

Optional setting for email action (config.php):

smtp_server - SMTP server host name, address

smtp_port - SMTP server port number

auth_email

Does the same as email action, but send messages via SMTP server that requires username and password authorization.

Additional settings (config.php):

smtp_login - Username

smtp_password - Password