CRM_Utils_Mail
class CRM_Utils_Mail
Methods
Create a new mailer to send any mail from the application.
Create a new instance of a PEAR Mail driver.
Wrapper function to send mail in CiviCRM. Hooks are called from this function. The input parameter is an associateive array which holds the values of field needed to send an email. These are:
No description
No description
Get the email address itself from a formatted full name + address string
Get the Active outBound email.
No description
No description
Takes a string and checks to see if it needs to be escaped / double quoted and if so does the needful and return the formatted name
No description
Details
at line 45
static Mail
createMailer()
Create a new mailer to send any mail from the application.
Note: The mailer is opened in persistent mode.
Note: You probably don't want to call this directly. Get a reference to the mailer through the container.
at line 122
static object
_createMailer(string $driver, array $params)
Create a new instance of a PEAR Mail driver.
at line 157
static bool
send(array $params)
Wrapper function to send mail in CiviCRM. Hooks are called from this function. The input parameter is an associateive array which holds the values of field needed to send an email. These are:
from : complete from envelope toName : name of person to send email toEmail : email address to send to cc : email addresses to cc bcc : email addresses to bcc subject : subject of the email text : text of the message html : html version of the message replyTo : reply-to header in the email attachments: an associative array of fullPath : complete pathname to the file mime_type: mime type of the attachment cleanName: the user friendly name of the attachmment
at line 301
static string
errorMessage($mailer, $result)
at line 325
static
logger($to, $headers, $message)
at line 365
static string
pluckEmailFromHeader(string $header)
Get the email address itself from a formatted full name + address string
Ugly but working.
at line 380
static bool
validOutBoundMail()
Get the Active outBound email.
at line 412
static mixed
setMimeParams($message, array $params = NULL)
at line 436
static null|string
formatRFC822Email(string $name, $email, bool $useQuote = FALSE)
at line 478
static string
formatRFC2822Name(string $name)
Takes a string and checks to see if it needs to be escaped / double quoted and if so does the needful and return the formatted name
This code has been copied and adapted from ezc/Mail/src/tools.php