资 源 简 介
SmartyMailer class
Create beautiful mails using Smarty
Design them with standard CSS stylesheets
SmartyMailer will convert your CSS to inline styles for correct rendering into e-mail clients
Example Usage :
Displaying :
$SmartyMailer = new SmartyMailer();
$SmartyMailer -> SetTemplateFile("MyTemplate.tpl") // Smarty template
$SmartyMailer -> SetCssFile("MyStyles.css") // Css styles
$SmartyMailer -> Assign("FirstName", "Ben") // Smarty variable assignments (you can use any Smarty method)
$SmartyMailer -> Process() -> ShowOutput() // Processes and displays the result
Sending :
$SmartyMailer -> SetSender("from@example.com") // Set email"s sender
$SmartyMailer -> SetRecipient("to@example.com") // Set email"s recipient
$SmartyMailer -> SetSubject("Hello {$FirstName}") // Set email"s subject (can be a Smarty s