Online Chat
 Call Us: 
Browse Submit a Ticket
Advanced Search
Rss Categories

Email Sending Action

Author: Eileen Wilde Reference Number: AA-00151 Views: 13908 Last Updated: 01/20/2014 04:01 PM 0 Rating/ Voters


Processes email-templates and sends emails.

Parameter:  Path to the template file.


email = ../somedir/email.txt

Email-templates should have the following format:

Subject: This is an email subject

This is an email body.
There is an empty line before the email body and no empty lines between headers.

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

Reply-To: - this email address will be inserted to the To: field when you reply to the message sent using this template
Cc: - carbon copy
Bcc: - blind carbon copy

Format: - sets the email format, HTML or plain (plain by default)
Charset: - sets the email charset (ISO-8851, UTF-8, etc)
Attachment: {#user-file#} - if you want the user to attach a file via the form. In this case "user-file" should be an field name from your form.
Attachment: - a file name to attach from the corresponding path. Note: all paths should be provided relative to Form Processor Pro  (fpp)directory or as absolute paths.


Attachment: /path/to/
Attachment: ../myform/
Attachment: {#file_field#}

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

Email templates will be parsed as a normal template and you may use all parsing features. Also, you may separate multiple recipients or attachments  with commas.

Example of an email template:

To: {#email#}
Subject: Your data was successfully added to database

Dear {#name#},
Thank you for filling out our form.

Optional settings for an email action config.php:

smtp_server = SMTP server host name, address
smtp_port = SMTP server port number


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

If you want to send email only if some conditions are true, refer to the "Optional Email Sending" article.

Additional settings (config.php):

smtp_login = Username
smtp_password = Password

Secure protocol

You can send emails via secure protocol if it is supported by your mail server.

For SSL protocol add this line to the global configuration section in config.php:

smtp_secure = ssl

For TLS add this one:

smtp_secure = tls