7.1

Table Of Contents
An e-mail template in Notepad++
The following functions are available for all e-mail templates:
setSubject: This function sets the subject for the e-mail message. If no subject is specified the subject
is set to: No Subject.
$this->setSubject("Password Assistance")
setFrom: This function overrides the Sender e-mail address set in the E-mail Settings.
$this->setFrom("info@printshopweb.com")
setFromName: This function overrides the Sender e-mail address set in the E-mail Settings.
$this->setFromName("MyCards.com")
setTo: By default PrintShop Mail Web will determine the recipients of the message based on the E-mail
Addressees settings in the Settings section. The setTo function overrides the "To" header defined by the
system.
The first parameter is the e-mail address, the function accepts a second optional parameter that is used
as a human-readable name of the recipient for the header.
$this->setTo(“psw-beta@eu.objectiflune.com”,”PSW Beta”)
addTo: Adds a recipient to the mail with a "To" header.
The first parameter is the e-mail address, the function accepts a second optional parameter that is used
as a human-readable name of the recipient for the header.
$this->addTo(“psw-beta@eu.objectiflune.com”,”PSW Beta”)
addCc: Adds a recipient to the "Cc" header of the message.
The first parameter is the e-mail address, the function accepts a second optional parameter that is used
as a human-readable name of the recipient for the header.
$this->addCc(“psw-beta@eu.objectiflune.com”,”PSW Beta”)
addBcc: Adds a recipient to the "BCc" header of the message.
The first parameter is the e-mail address, the function accepts a second optional parameter that is used
as a human-readable name of the recipient for the header.
$this->addBcc(“logger@eu.objectiflune.com”,”Logger”)
setHtmlContent: Sets the content type of the message body to text/html (default).
$this->setHtmlContent()
setPlainTextContent: Sets the content type of the message body to text/plain.
$this->setPlainTextContent()
setCharset: This functions sets the charset of the message body.
$this->setCharset("UTF-8"); (default)
$this->setCharset("iso-8859-1")
addAttachment: Adds an attachment from a path on the filesystem.
$this->addAttachment("application/pdf","sample1.pdf");
$this->addAttachment("application/pdf","/files/jobs/1/8/8_lr.pdf");
$this->addAttachment("application/pdf","/files/jobs/$this->companyid/$this->jobs[0]/$this-> jobs [0]
_lr.pdf");
E-mail - Managing E-mail Templates
Objectif Lune Inc. © 2010 143