email($template, $from, $from_name, $to, $name, $subject)
This function helps the web designer send an email to whoever her chooses.Syntax:
{$mailer->email($template, $from, $from_name, $to, $name, $subject)}
| Parameter | Default Value | Description | Sample Value |
| $template | n/a | draft of mail | contactus.tpl |
| $from | n/a | Sender Email | nobody@example.com |
| $from_name | n/a | Sender Name | Nobody |
| $to | n/a | Reciever Email | someone@example.com |
| $name | n/a | Reciever Name | Someone |
| $subject | n/a | The Subject of the mail | The Subject |
Sample Usage:
{assign var="contactus_name" value="New Mail"}
{assign var="contactus_email" value="info@example.com"}
{$mailer->email("contactus.email.user.tpl", $smarty.post.email,
smarty.post.fullname,$contactus_email, $contactus_name, "The Subject")}
Sample Contents of Email Template (contactus.email.user.tpl)
<html>
<head></head>
<body>
<a target="_blank" href="http://cms.b2b.com.ph/rbcms/index.php">
<img src="http://202.81.162.159/rbcms_admin/
_media/download_media.php?file_id=LPG" border="0">
</a>
<br><br><br>
<h2>Thank you for your e-mail.</h2>
<p>This assures you that your e-mail has been received by our server.</p>
<p>One of our staff will respond to your inquiry by e-mail or by phone. </p>
<p>You can also call us at our Trunkline (632) 230-8777 / (632) 480-07777 </p>
<p>during business hours, Monday to Friday 8:30AM to 6:00PM.</p>
<br><br>
<p>From the Management</p><p><br><br>
<img src="http://202.81.162.159/rbcms_admin/_media/download_media.php?file_id=LPK">
<br><br>
</p><p><a target="_blank" href="">RBCMS</a></p>
<p><i>tag line here</i></p>
</body>
</html>