Verify an email addresses well-formedness.
static
$ok
emailOK
($addr $addr)
-
$addr
$addr: string Email address to check.
Constructor. Initializes object.
See PEAR Mail config for info on the what the parameters do.
Mail_Mailer
__construct
([$driver $driver = 'smtp'], [$config $config = NULL])
-
$driver
$driver: string The PEAR Mail backend to use. One of smtp, sendmail, or mail. DEFAULT is smtp. OPTIONAL.
-
$config
$config: array A PEAR Mail compatible config array. By default, will use local SMTP connection. OPTIONAL.
Add an attachment from a file.
void
addAttachment
($filepath $filepath, [$filetype $filetype = 'application/octet-stream'], [$name $name = ''])
-
$filepath
$filepath: string The path to the file to attach
-
$filetype
$filetype: string The mime type of the file. defaults to 'application/octet-stream'
-
$name
$name: string The name of the attachment. defaults to ''.
Add an attachment from a stream of data.
void
addAttachmentStream
($file $filedata, [$filetype $filetype = 'application/octet-stream'], [$name $name = ''])
-
$file
$filedata: string The file data stream
-
$filetype
$filetype: string The mime type of the file. defaults to 'application/octet-stream'
-
$name
$name: string The name of the attachment. defaults to ''.
Add an email to the BCC list.
0
addBCCEmail
($bcc $bcc)
-
$bcc
$bcc: Email address.
Add an email to the CC list.
0
addCCEmail
($cc $cc)
Send the email out.
err
send
()
Set a flag to BCC the sender.
void
setBCCSender
($bcc_sender $bcc_sender)
-
$bcc_sender
$bcc_sender: boolean
Set the FROM address for the email.
$err
setFromEmail
($from_email $from_email)
-
$from_email
$from_email: string Properly formatted email.
Set the FROM NAME for the email.
void
setFromName
($from_name $from_name)
-
$from_name
$from_name: string From name
Set the HTML for the message.
void
setMessageHTML
($html $html_msg)
-
$html
$html_msg: string HTML to use for HTML portion of message.
If just a simple message is desired to be sent, the caller can use this function.
void
setMessageTEXT
($msg $msg)
-
$msg
$msg: string - the BODY of the email.
Set the priority of the message.
$err
setPriority
($priority $priority)
-
$priority
$priority: int Priority from 1 to 5, 1 is MOST IMPORTANT.
Set the REPLY TO address for the email.
$err
setReplyToEmail
($reply_to_email $reply_to_email)
-
$reply_to_email
$reply_to_email: string Properly formatted email.
Set the subject line of the message.
void
setSubject
($subj $subj)
-
$subj
$subj: string The subject.
Set the TO address for the email.
$err
setToEmail
($to $to)
-
$to
$to: string Properly formatted email.
Set the TO NAME for the email.
void
setToName
($to $to)
-
$to
$to: string NAME of the person being sent to.