class JMail extends PHPMailer


Located at : UKNOWVA_ROOT/libraries/joomla/mail/mail.php

Email Class. Provides a common interface to send email from the Joomla! Framework

Constants

STOP_MESSAGE

STOP_CONTINUE

STOP_CRITICAL

Properties

int $Priority Email priority (1 = High, 3 = Normal, 5 = low). from PHPMailer
string $CharSet Sets the CharSet of the message. from PHPMailer
string $ContentType Sets the Content-type of the message. from PHPMailer
string $Encoding Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable". from PHPMailer
string $ErrorInfo Holds the most recent mailer error message. from PHPMailer
string $From Sets the From email address for the message. from PHPMailer
string $FromName Sets the From name of the message. from PHPMailer
string $Sender Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. from PHPMailer
string $Subject Sets the Subject of the message. from PHPMailer
string $Body Sets the Body of the message. This can be either an HTML or text body. from PHPMailer
string $AltBody Sets the text-only body of the message. This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body. from PHPMailer
int $WordWrap Sets word wrapping on the body of the message to a given number of characters. from PHPMailer
string $Mailer Method to send mail: ("mail", "sendmail", or "smtp"). from PHPMailer
string $Sendmail Sets the path of the sendmail program. from PHPMailer
string $PluginDir Path to PHPMailer plugins. Useful if the SMTP class is in a different directory than the PHP include path. from PHPMailer
string $ConfirmReadingTo Sets the email address that a reading confirmation will be sent. from PHPMailer
string $Hostname Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'. from PHPMailer
string $MessageID Sets the message ID to be used in the Message-Id header. from PHPMailer
string $Host Sets the SMTP hosts. All hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port] (e.g. "smtp1.example.com:25;smtp2.example.com"). from PHPMailer
int $Port Sets the default SMTP server port. from PHPMailer
string $Helo Sets the SMTP HELO of the message (Default is $Hostname). from PHPMailer
string $SMTPSecure Sets connection prefix. from PHPMailer
bool $SMTPAuth Sets SMTP authentication. Utilizes the Username and Password variables. from PHPMailer
string $Username Sets SMTP username. from PHPMailer
string $Password Sets SMTP password. from PHPMailer
int $Timeout Sets the SMTP server timeout in seconds. from PHPMailer
bool $SMTPDebug Sets SMTP class debugging on or off. from PHPMailer
bool $SMTPKeepAlive Prevents the SMTP connection from being closed after each mail sending. If this is set to true then to close the connection requires an explicit call to SmtpClose(). from PHPMailer
bool $SingleTo Provides the ability to have the TO field process individual emails, instead of sending to entire TO addresses from PHPMailer
bool $SingleToArray If SingleTo is true, this provides the array to hold the email addresses from PHPMailer
string $LE Provides the ability to change the line ending from PHPMailer
string $DKIM_selector Used with DKIM DNS Resource Record from PHPMailer
string $DKIM_identity Used with DKIM DNS Resource Record optional, in format of email address 'you@yourdomain.com' from PHPMailer
string $DKIM_domain Used with DKIM DNS Resource Record optional, in format of email address 'you@yourdomain.com' from PHPMailer
string $DKIM_private Used with DKIM DNS Resource Record optional, in format of email address 'you@yourdomain.com' from PHPMailer
string $action_function Callback Action function name the function that handles the result of the send email action. Parameters: bool $result result of the send action string $to email address of the recipient string $cc cc email addresses string $bcc bcc email addresses string $subject the subject string $body the email body from PHPMailer
string $Version Sets the PHPMailer Version number from PHPMailer

Methods

__construct()

Constructor

void
IsHTML(bool $ishtml = true)

Sets message type to HTML.

from PHPMailer
void
IsSMTP()

Sets Mailer to send message using SMTP.

from PHPMailer
void
IsMail()

Sets Mailer to send message using PHP mail() function.

from PHPMailer
void
IsSendmail()

Sets Mailer to send message using the $Sendmail program.

from PHPMailer
void
IsQmail()

Sets Mailer to send message using the qmail MTA.

from PHPMailer
boolean
AddAddress(string $address, string $name = '')

Adds a "To" address.

from PHPMailer
boolean
AddCC(string $address, string $name = '')

Adds a "Cc" address.

from PHPMailer
boolean
AddBCC(string $address, string $name = '')

Adds a "Bcc" address.

from PHPMailer
boolean
AddReplyTo(string $address, string $name = '')

Adds a "Reply-to" address.

from PHPMailer
boolean
SetFrom($address, $name = '', $auto = 1)

Set the From and FromName properties

from PHPMailer
static boolean
ValidateAddress(string $address)

Check that a string looks roughly like an email address should Static so it can be used without instantiation Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator Conforms approximately to RFC2822

from PHPMailer
bool
Send()

Send the mail

bool
SmtpConnect()

Initiates a connection to an SMTP server.

from PHPMailer
void
SmtpClose()

Closes the active SMTP session if one exists.

from PHPMailer
SetLanguage(string $langcode = 'en', string $lang_path = 'language/')

Sets the language for all class error messages.

from PHPMailer
array
GetTranslations()

Return the current array of language strings

from PHPMailer
string
AddrAppend($type, $addr)

Creates recipient headers.

from PHPMailer
string
AddrFormat($addr)

Formats an address correctly.

from PHPMailer
string
WrapText(string $message, integer $length, boolean $qp_mode = false)

Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.

from PHPMailer
int
UTF8CharBoundary(string $encodedText, int $maxLength)

Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.

from PHPMailer
void
SetWordWrap()

Set the body wrapping.

from PHPMailer
string
CreateHeader()

Assembles message header.

from PHPMailer
string
GetMailMIME()

Returns the message MIME.

from PHPMailer
string
CreateBody()

Assembles the message body. Returns an empty string on failure.

from PHPMailer
string
HeaderLine($name, $value)

Returns a formatted header line.

from PHPMailer
string
TextLine($value)

Returns a formatted mail line.

from PHPMailer
bool
AddAttachment(string $path, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream')

Adds an attachment from a path on the filesystem.

from PHPMailer
array
GetAttachments()

Return the current array of attachments

from PHPMailer
string
EncodeString(string $str, string $encoding = 'base64')

Encodes string to requested format.

from PHPMailer
string
EncodeHeader($str, $position = 'text')

Encode a header string to best (shortest) of Q, B, quoted or none.

from PHPMailer
bool
HasMultiBytes(string $str)

Checks if a string contains multibyte characters.

from PHPMailer
string
Base64EncodeWrapMB(string $str)

Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character.

from PHPMailer
string
EncodeQPphp($input = '', $line_max = 76, $space_conv = false)

Encode string to quoted-printable.

from PHPMailer
string
EncodeQP(string $string, integer $line_max = 76, boolean $space_conv = false)

Encode string to RFC2045 (6.7) quoted-printable format Uses a PHP5 stream filter to do the encoding about 64x faster than the old version Also results in same content as you started with after decoding

from PHPMailer
string
EncodeQ(string $str, string $position = 'text')

Encode string to q encoding.

from PHPMailer
void
AddStringAttachment(string $string, string $filename, string $encoding = 'base64', string $type = 'application/octet-stream')

Adds a string or binary attachment (non-filesystem) to the list.

from PHPMailer
bool
AddEmbeddedImage(string $path, string $cid, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream')

Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".

from PHPMailer
bool
InlineImageExists()

Returns true if an inline attachment is present.

from PHPMailer
void
ClearAddresses()

Clears all recipients assigned in the TO array. Returns void.

from PHPMailer
void
ClearCCs()

Clears all recipients assigned in the CC array. Returns void.

from PHPMailer
void
ClearBCCs()

Clears all recipients assigned in the BCC array. Returns void.

from PHPMailer
void
ClearReplyTos()

Clears all recipients assigned in the ReplyTo array. Returns void.

from PHPMailer
void
ClearAllRecipients()

Clears all recipients assigned in the TO, CC and BCC array. Returns void.

from PHPMailer
void
ClearAttachments()

Clears all previously set filesystem, string, and binary attachments. Returns void.

from PHPMailer
void
ClearCustomHeaders()

Clears all custom headers. Returns void.

from PHPMailer
static string
RFCDate()

Returns the proper RFC 822 formatted date.

from PHPMailer
bool
IsError()

Returns true if an error occurred.

from PHPMailer
void
AddCustomHeader($custom_header)

Adds a custom header.

from PHPMailer
$message
MsgHTML($message, $basedir = '')

Evaluates the message and returns modifications for inline images and backgrounds

from PHPMailer
static string
_mime_types(string $ext = '')

Gets the MIME type of the embedded or inline image

from PHPMailer
set(string $name, mixed $value = '')

Set (or reset) Class Objects (variables)

from PHPMailer
string
SecureHeader(string $str)

Strips newlines to prevent header injection.

from PHPMailer
Sign($cert_filename, $key_filename, $key_pass)

Set the private key file and password to sign the message.

from PHPMailer
DKIM_QP($txt)

Set the private key file and password to sign the message.

from PHPMailer
DKIM_Sign(string $s)

Generate DKIM signature

from PHPMailer
DKIM_HeaderC(string $s)

Generate DKIM Canonicalization Header

from PHPMailer
DKIM_BodyC(string $body)

Generate DKIM Canonicalization Body

from PHPMailer
DKIM_Add(string $headers_line, string $subject, string $body)

Create the DKIM header, body, as new header

from PHPMailer
static JMail
getInstance(string $id = 'Joomla')

Returns the global email object, only creating it if it doesn't already exist.

setSender(array $from)

Set the email sender

setSubject(string $subject)

Set the email subject

setBody(string $content)

Set the email body

addRecipient(mixed $recipient, mixed $name = '')

Add recipients to the email

addCC(mixed $cc, mixed $name = '')

Add carbon copy recipients to the email

addBCC(mixed $bcc, mixed $name = '')

Add blind carbon copy recipients to the email

addAttachment(mixed $attachment, mixed $name = '', mixed $encoding = 'base64', mixed $type = 'application/octet-stream')

Add file attachments to the email

addReplyTo(array $replyto, array $name = '')

Add Reply to email address(es) to the email

boolean
useSendmail(string $sendmail = null)

Use sendmail for sending the email

boolean
useSMTP(string $auth = null, string $host = null, string $user = null, string $pass = null, string $secure = null, integer $port = 25)

Use SMTP for sending the email

boolean
sendMail(string $from, string $fromName, mixed $recipient, string $subject, string $body, boolean $mode, mixed $cc = null, mixed $bcc = null, mixed $attachment = null, mixed $replyTo = null, mixed $replyToName = null)

Function to send an email

boolean
sendAdminMail(string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, string $url = null)

Sends mail to administrator for approval of a user submission

Details

at line 27
__construct()

Constructor

in PHPMailer at line 351
void IsHTML(bool $ishtml = true)

Sets message type to HTML.

Parameters

bool $ishtml

Return Value

void

in PHPMailer at line 363
void IsSMTP()

Sets Mailer to send message using SMTP.

Return Value

void

in PHPMailer at line 371
void IsMail()

Sets Mailer to send message using PHP mail() function.

Return Value

void

in PHPMailer at line 379
void IsSendmail()

Sets Mailer to send message using the $Sendmail program.

Return Value

void

in PHPMailer at line 390
void IsQmail()

Sets Mailer to send message using the qmail MTA.

Return Value

void

in PHPMailer at line 407
boolean AddAddress(string $address, string $name = '')

Adds a "To" address.

Parameters

string $address
string $name

Return Value

boolean true on success, false if address already used

in PHPMailer at line 418
boolean AddCC(string $address, string $name = '')

Adds a "Cc" address.

Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

Parameters

string $address
string $name

Return Value

boolean true on success, false if address already used

in PHPMailer at line 429
boolean AddBCC(string $address, string $name = '')

Adds a "Bcc" address.

Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.

Parameters

string $address
string $name

Return Value

boolean true on success, false if address already used

in PHPMailer at line 439
boolean AddReplyTo(string $address, string $name = '')

Adds a "Reply-to" address.

Parameters

string $address
string $name

Return Value

boolean

in PHPMailer at line 488
boolean SetFrom($address, $name = '', $auto = 1)

Set the From and FromName properties

Parameters

$address
$name
$auto

Return Value

boolean

in PHPMailer at line 523
static boolean ValidateAddress(string $address)

Check that a string looks roughly like an email address should Static so it can be used without instantiation Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator Conforms approximately to RFC2822

Parameters

string $address The email address to check

Return Value

boolean

at line 67
bool Send()

Send the mail

Return Value

bool

in PHPMailer at line 797
bool SmtpConnect()

Initiates a connection to an SMTP server.

Returns false if the operation failed.

Return Value

bool

in PHPMailer at line 859
void SmtpClose()

Closes the active SMTP session if one exists.

Return Value

void

in PHPMailer at line 875
SetLanguage(string $langcode = 'en', string $lang_path = 'language/')

Sets the language for all class error messages.

Returns false if it cannot load the language file. The default language is English.

Parameters

string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br")
string $lang_path Path to the language file directory

in PHPMailer at line 909
array GetTranslations()

Return the current array of language strings

Return Value

array

in PHPMailer at line 922
string AddrAppend($type, $addr)

Creates recipient headers.

Parameters

$type
$addr

Return Value

string

in PHPMailer at line 939
string AddrFormat($addr)

Formats an address correctly.

Parameters

$addr

Return Value

string

in PHPMailer at line 957
string WrapText(string $message, integer $length, boolean $qp_mode = false)

Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.

Original written by philippe.

Parameters

string $message The message to wrap
integer $length The line length to wrap to
boolean $qp_mode Whether to run in Quoted-Printable mode

Return Value

string

in PHPMailer at line 1039
int UTF8CharBoundary(string $encodedText, int $maxLength)

Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.

Original written by Colin Brown.

Parameters

string $encodedText utf-8 QP text
int $maxLength find last character boundary prior to this length

Return Value

int

in PHPMailer at line 1077
void SetWordWrap()

Set the body wrapping.

Return Value

void

in PHPMailer at line 1098
string CreateHeader()

Assembles message header.

Return Value

string The assembled header

in PHPMailer at line 1181
string GetMailMIME()

Returns the message MIME.

Return Value

string

in PHPMailer at line 1215
string CreateBody()

Assembles the message body. Returns an empty string on failure.

Return Value

string The assembled message body

in PHPMailer at line 1342
string HeaderLine($name, $value)

Returns a formatted header line.

Parameters

$name
$value

Return Value

string

in PHPMailer at line 1351
string TextLine($value)

Returns a formatted mail line.

Parameters

$value

Return Value

string

in PHPMailer at line 1369
bool AddAttachment(string $path, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream')

Adds an attachment from a path on the filesystem.

Returns false if the file could not be found or accessed.

Parameters

string $path Path to the attachment.
string $name Overrides the attachment name.
string $encoding File encoding (see $Encoding).
string $type File extension (MIME) type.

Return Value

bool

in PHPMailer at line 1407
array GetAttachments()

Return the current array of attachments

Return Value

array

in PHPMailer at line 1516
string EncodeString(string $str, string $encoding = 'base64')

Encodes string to requested format.

Returns an empty string on failure.

Parameters

string $str The text to encode
string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'

Return Value

string

in PHPMailer at line 1547
string EncodeHeader($str, $position = 'text')

Encode a header string to best (shortest) of Q, B, quoted or none.

Parameters

$str
$position

Return Value

string

in PHPMailer at line 1608
bool HasMultiBytes(string $str)

Checks if a string contains multibyte characters.

Parameters

string $str multi-byte text to wrap encode

Return Value

bool

in PHPMailer at line 1624
string Base64EncodeWrapMB(string $str)

Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character.

Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php

Parameters

string $str multi-byte text to wrap encode

Return Value

string

in PHPMailer at line 1664
string EncodeQPphp($input = '', $line_max = 76, $space_conv = false)

Encode string to quoted-printable.

Only uses standard PHP, slow, but will always work

Parameters

$input
$line_max
$space_conv

Return Value

string

in PHPMailer at line 1717
string EncodeQP(string $string, integer $line_max = 76, boolean $space_conv = false)

Encode string to RFC2045 (6.7) quoted-printable format Uses a PHP5 stream filter to do the encoding about 64x faster than the old version Also results in same content as you started with after decoding

Parameters

string $string the text to encode
integer $line_max Number of chars allowed on a line before wrapping
boolean $space_conv Dummy param for compatibility with existing EncodeQP function

Return Value

string

See also

EncodeQPphp()

in PHPMailer at line 1746
string EncodeQ(string $str, string $position = 'text')

Encode string to q encoding.

Parameters

string $str the text to encode
string $position Where the text is going to be used, see the RFC for what that means

Return Value

string

in PHPMailer at line 1781
void AddStringAttachment(string $string, string $filename, string $encoding = 'base64', string $type = 'application/octet-stream')

Adds a string or binary attachment (non-filesystem) to the list.

This method can be used to attach ascii or binary data, such as a BLOB record from a database.

Parameters

string $string String attachment data.
string $filename Name of the attachment.
string $encoding File encoding (see $Encoding).
string $type File extension (MIME) type.

Return Value

void

in PHPMailer at line 1808
bool AddEmbeddedImage(string $path, string $cid, string $name = '', string $encoding = 'base64', string $type = 'application/octet-stream')

Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".

Parameters

string $path Path to the attachment.
string $cid Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form.
string $name Overrides the attachment name.
string $encoding File encoding (see $Encoding).
string $type File extension (MIME) type.

Return Value

bool

in PHPMailer at line 1840
bool InlineImageExists()

Returns true if an inline attachment is present.

Return Value

bool

in PHPMailer at line 1857
void ClearAddresses()

Clears all recipients assigned in the TO array. Returns void.

Return Value

void

in PHPMailer at line 1868
void ClearCCs()

Clears all recipients assigned in the CC array. Returns void.

Return Value

void

in PHPMailer at line 1879
void ClearBCCs()

Clears all recipients assigned in the BCC array. Returns void.

Return Value

void

in PHPMailer at line 1890
void ClearReplyTos()

Clears all recipients assigned in the ReplyTo array. Returns void.

Return Value

void

in PHPMailer at line 1899
void ClearAllRecipients()

Clears all recipients assigned in the TO, CC and BCC array. Returns void.

Return Value

void

in PHPMailer at line 1911
void ClearAttachments()

Clears all previously set filesystem, string, and binary attachments. Returns void.

Return Value

void

in PHPMailer at line 1919
void ClearCustomHeaders()

Clears all custom headers. Returns void.

Return Value

void

in PHPMailer at line 1949
static string RFCDate()

Returns the proper RFC 822 formatted date.

Return Value

string

in PHPMailer at line 1998
bool IsError()

Returns true if an error occurred.

Return Value

bool

in PHPMailer at line 2019
void AddCustomHeader($custom_header)

Adds a custom header.

Parameters

$custom_header

Return Value

void

in PHPMailer at line 2028
$message MsgHTML($message, $basedir = '')

Evaluates the message and returns modifications for inline images and backgrounds

Parameters

$message
$basedir

Return Value

$message

in PHPMailer at line 2066
static string _mime_types(string $ext = '')

Gets the MIME type of the embedded or inline image

Parameters

string $ext File extension

Return Value

string MIME type of ext

in PHPMailer at line 2171
set(string $name, mixed $value = '')

Set (or reset) Class Objects (variables)

Usage Example: $page->set('X-Priority', '3');

Parameters

string $name Parameter Name
mixed $value Parameter Value NOTE: will not work with arrays, there are no arrays to set/reset

in PHPMailer at line 2193
string SecureHeader(string $str)

Strips newlines to prevent header injection.

Parameters

string $str String

Return Value

string

in PHPMailer at line 2206
Sign($cert_filename, $key_filename, $key_pass)

Set the private key file and password to sign the message.

Parameters

$cert_filename
$key_filename
$key_pass

in PHPMailer at line 2219
DKIM_QP($txt)

Set the private key file and password to sign the message.

Parameters

$txt

in PHPMailer at line 2239
DKIM_Sign(string $s)

Generate DKIM signature

Parameters

string $s Header

in PHPMailer at line 2257
DKIM_HeaderC(string $s)

Generate DKIM Canonicalization Header

Parameters

string $s Header

in PHPMailer at line 2276
DKIM_BodyC(string $body)

Generate DKIM Canonicalization Body

Parameters

string $body Message Body

in PHPMailer at line 2296
DKIM_Add(string $headers_line, string $subject, string $body)

Create the DKIM header, body, as new header

Parameters

string $headers_line Header lines
string $subject Subject
string $body Body

at line 46
static JMail getInstance(string $id = 'Joomla')

Returns the global email object, only creating it if it doesn't already exist.

NOTE: If you need an instance to use that does not have the global configuration values, use an id string that is not 'Joomla'.

Parameters

string $id The id string for the JMail instance [optional]

Return Value

JMail The global JMail object

at line 94
JMail setSender(array $from)

Set the email sender

Parameters

array $from email address and Name of sender array([0] => email Address [1] => Name)

Return Value

JMail Returns this object for chaining.

at line 121
JMail setSubject(string $subject)

Set the email subject

Parameters

string $subject Subject of the email

Return Value

JMail Returns this object for chaining.

at line 137
JMail setBody(string $content)

Set the email body

Parameters

string $content Body of the email

Return Value

JMail Returns this object for chaining.

at line 158
JMail addRecipient(mixed $recipient, mixed $name = '')

Add recipients to the email

Parameters

mixed $recipient Either a string or array of strings [email address(es)]
mixed $name Either a string or array of strings [name(s)]

Return Value

JMail Returns this object for chaining.

at line 186
JMail addCC(mixed $cc, mixed $name = '')

Add carbon copy recipients to the email

Parameters

mixed $cc Either a string or array of strings [email address(es)]
mixed $name Either a string or array of strings [name(s)]

Return Value

JMail Returns this object for chaining.

at line 216
JMail addBCC(mixed $bcc, mixed $name = '')

Add blind carbon copy recipients to the email

Parameters

mixed $bcc Either a string or array of strings [email address(es)]
mixed $name Either a string or array of strings [name(s)]

Return Value

JMail Returns this object for chaining.

at line 248
JMail addAttachment(mixed $attachment, mixed $name = '', mixed $encoding = 'base64', mixed $type = 'application/octet-stream')

Add file attachments to the email

Parameters

mixed $attachment Either a string or array of strings [filenames]
mixed $name Either a string or array of strings [names]
mixed $encoding string
mixed $type string

Return Value

JMail Returns this object for chaining.

at line 277
JMail addReplyTo(array $replyto, array $name = '')

Add Reply to email address(es) to the email

Parameters

array $replyto Either an array or multi-array of form array([0] => email Address [1] => Name)
array $name Either an array or single string

Return Value

JMail Returns this object for chaining.

at line 306
boolean useSendmail(string $sendmail = null)

Use sendmail for sending the email

Parameters

string $sendmail Path to sendmail [optional]

Return Value

boolean True on success

at line 336
boolean useSMTP(string $auth = null, string $host = null, string $user = null, string $pass = null, string $secure = null, integer $port = 25)

Use SMTP for sending the email

Parameters

string $auth SMTP Authentication [optional]
string $host SMTP Host [optional]
string $user SMTP Username [optional]
string $pass SMTP Password [optional]
string $secure
integer $port

Return Value

boolean True on success

at line 380
boolean sendMail(string $from, string $fromName, mixed $recipient, string $subject, string $body, boolean $mode, mixed $cc = null, mixed $bcc = null, mixed $attachment = null, mixed $replyTo = null, mixed $replyToName = null)

Function to send an email

Parameters

string $from From email address
string $fromName From name
mixed $recipient Recipient email address(es)
string $subject email subject
string $body Message body
boolean $mode false = plain text, true = HTML
mixed $cc CC email address(es)
mixed $bcc BCC email address(es)
mixed $attachment Attachment file name(s)
mixed $replyTo Reply to email address(es)
mixed $replyToName Reply to name(s)

Return Value

boolean True on success

at line 442
boolean sendAdminMail(string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, string $url = null)

Sends mail to administrator for approval of a user submission

Parameters

string $adminName Name of administrator
string $adminEmail Email address of administrator
string $email [NOT USED TODO: Deprecate?]
string $type Type of item to approve
string $title Title of item to approve
string $author Author of item to approve
string $url

Return Value

boolean True on success