A simple class to automate sending HTML email to Scholica users or email addresses. A usage sample can be found here.
(via XXX)to the FROM name.
__construct(Community $community = null)
Create a new class instance.
Set the email's subject. This is also displayed in the email header bar.
Set the HTML content for the email.
setTo(User|string $user, string $address = null)
Set the email recipient. Either supply a
User class instance and omit
the second arguments, or name and email as two string arguments.
setFrom(User|string $user, string $address = null, boolean $attribution = true, boolean $forcefrom = false)
Set the email sender. Either supply a
User class instance and omit the
second arguments, or name and email as two string arguments. When
$attribution is set to true, the 'From' name will end in '(via
$forcefrom is set to true, the email is sent from the
email address you specified. If set to false (default), only the
Reply-To email address is set to the specified address. The From address
will be set to a general 'no-reply' address to decrease the chance of the
email ending up in the SPAM box of the recipient.
setHeader(string $name, string $value)
Add a custom email header to the envelope.
Send the email.