Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Email Sending Action

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

email

Processes email-templates and sends 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 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.


Examples:

Attachment: /path/to/file.zip
-or-
Attachment: ../myform/test.zip
-or-
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#}
From: user@domain.com
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

auth_email

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