E-mail Field

Function : Defines An E-mail set, That is , A group of recipients who receive a specially formatted E-mail

Parameters

LabelThe label of this element
CSS ClassCSS class assigned to this element
Style using CSS only Defines whether or not JForms should append inline CSS attributes to the element, Set to “YES” if you want to disable inline CSS attributes
Allow user input When set to yes, the user will be presented with a text field and allowed to specify E-mail address that will receive this format message
Allow multiple E-mails When combined with “Allow user input” this allows the user to input more than one E-mail separated by commas.
Required Whether or not this field is required , the Form will not be submitted until this field is filled
Additional E-mails Comma separated list of E-mail address which will receive this message as well, the value of this field is combined with user input to generate the final list of recipients, As of 0.7 Rev331 This field supports Mail Placeholders
Reply to Reply-to field in the E-mail , Mail Placeholders can be used
Subject Subject of the message , Mail Placeholders can be used
Message FormatThe body of the message, , Mail Placeholders can be used

Example

Prerequisites

Make sure you have the Mail Plugin enable for this form

Procedure

Assuming we have a form that has the following fields

  • Name
  • Address
  • Age
  • Gender

We want the user to specify his E-mail , We also want to send administrators an E-mail letting them know that a new entry has been added

To do that we add two more E-mail elements “Because we're going to send two different messages”

  • E-mail (A field of the type E-mail , this will send the user an E-mail)
  • AdminEmail (A field of the type E-mail , This will send the admins an E-mail)

Set parameters of these two elements as follows

The First E-mail element

LabelE-mail
CSS ClassLeave as it is
Style using CSS only Leave as it is
Allow user input Yes , because we want the user to specify his E-mail
Allow multiple E-mails No , Because we want the user to specify only one E-mail
Required Yes
Additional E-mails Leave empty
Reply to Leave empty use a Mail Placeholders
Subject Thank you {field:name}
Message FormatDear {field:name} we have received your submission, we'll send someone to your address ({FIELD=ADDRESS}, Thank you

Note that the Mail Placeholder can be used in any of these formats

Now to the Administrators E-mail

LabelAdminMail
CSS ClassLeave as it is
Style using CSS only Leave as it is
Allow user input No , because we want to specify the E-mail addresses ourselves
Allow multiple E-mails No
Required No
Additional E-mails Place the E-mails of the recipients (administrators) separated by commas
Reply to {field:e-mail}
Subject A submission received from {field:name}
Message FormatDear administrator, {field:name} have sent a new submission to {FORM_NAME} contain the following data {ENTRY_DATA}, Have a nice day

When the user fills the form , 2 E-mails sets will be sent , one to the user and another to the administrators, note that the administrator E-mail can be sent to more than one person

If you want to send 3 different e-mail sets rather than two simply add an E-mail element and configure it as you see fit

 
0.7/elements/email.txt · Last modified: 2009/10/03 01:19 by dr_drsh
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki