Email Module Tags

ExpressionEngine includes an Email Module in order to provide the ability to create contact forms and tell-a-friend forms.

Contact Form

The Contact Forms tag allows you to provide a means for your visitors to give you feedback. Users can send you an email directly through the site. Example:

{exp:email:contact_form user_recipients="false" recipients="admin@yoursite.com" charset="utf-8"}

<h2>Support Form</h2>

<p><label for="from">From:</label><br />
<input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" /></p>

<p><label for="subject">Subject:</label><br />
<input type="text" id="subject" name="subject" size="40" value="Contact Form" /></p>

<p><label for="message">Message:</label><br />
<textarea id="message" name="message" rows="18" cols="40">Support Email from: {member_name}
Sent at: {current_time format="%Y %m %d"}</textarea></p>

<p><input name="submit" type='submit' value='Submit Form' /></p>

{/exp:email:contact_form}

Tell-a-Friend Form

ExpressionEngine's Tell-a-Friend feature allows your site visitors to easily share one of your entries with someone else. This is done by sending using the tell-a-friend feature to send their friend an email. Example:

{exp:email:tell_a_friend charset="utf-8" allow_html='n'}

<p><label for="from">Your Email: </label><br />
<input type="text" id="from" name="from" size="40" maxlength="35" value="{member_email}" /></p>

<p><label for="name">Your Name: </label><br />
<input type="text" id="name" name="name" size="40" maxlength="35" value="{member_name}" /></p>

<p><label for="to">To: </label><br />
<input type="text" id="to" name="to" size="40" maxlength="35" /></p>

<p><label for="subject">Subject: </label><br />
<input type="text" id="subject" name="subject" size="40" value="Entry by: {author}" /></p>

<p><label for="message">Message: </label><br />
<textarea id="message" name="message" rows="18" cols="40">
{summary}
{body}
{permalink}
</textarea></p>

<p><input name="submit" type='submit' value='Submit Form' /></p>
{/exp:email:tell_a_friend}