Class JMail

Description

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

  • author: Marcus Bointon
  • author: Andy Prevost
  • author: Jim Jagielski
  • version: $Id: class.phpmailer.php 450 2010-06-23 16:46:33Z coolbru $
  • copyright: 2010 - 2012 Jim Jagielski
  • copyright: 2004 - 2009 Andy Prevost
  • since: 11.1

Located in /libraries/joomla/mail/mail.php (line 21)

PHPMailer
   |
   --JMail
Variable Summary
static array $instances
string $CharSet
Method Summary
static JMail getInstance ([string $id = 'Joomla'])
JMail __construct ()
JMail addAttachment (mixed $attachment, [mixed $name = ''], [mixed $encoding = 'base64'], [mixed $type = 'application/octet-stream'])
JMail addBCC (mixed $bcc, [mixed $name = ''])
JMail addCC (mixed $cc, [mixed $name = ''])
JMail addRecipient (mixed $recipient, [mixed $name = ''])
JMail addReplyTo (array $replyto, [mixed $name = ''])
mixed Send ()
boolean sendAdminMail (string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, [string $url = null])
boolean sendMail (string $from, string $fromName, mixed $recipient, string $subject, string $body, [boolean $mode = false], [mixed $cc = null], [mixed $bcc = null], [mixed $attachment = null], [mixed $replyTo = null], [mixed $replyToName = null])
JMail setBody (string $content)
JMail setSender (array $from)
JMail setSubject (string $subject)
boolean useSendmail ([string $sendmail = null])
boolean useSMTP ([string $auth = null], [string $host = null], [string $user = null], [string $pass = null], [string $secure = null], [integer $port = 25])
Variables
static array $instances = array() (line 27)
  • var: JMail instances container.
  • since: 11.3
  • access: protected
string $CharSet = 'utf-8' (line 33)
  • var: Charset of the message.
  • since: 11.1
  • access: public

Redefinition of:
PHPMailer::$CharSet
Sets the CharSet of the message.

Inherited Variables

Inherited from PHPMailer

PHPMailer::$action_function
PHPMailer::$all_recipients
PHPMailer::$AltBody
PHPMailer::$attachment
PHPMailer::$bcc
PHPMailer::$Body
PHPMailer::$boundary
PHPMailer::$cc
PHPMailer::$ConfirmReadingTo
PHPMailer::$ContentType
PHPMailer::$CustomHeader
PHPMailer::$DKIM_domain
PHPMailer::$DKIM_identity
PHPMailer::$DKIM_passphrase
PHPMailer::$DKIM_private
PHPMailer::$DKIM_selector
PHPMailer::$Encoding
PHPMailer::$ErrorInfo
PHPMailer::$error_count
PHPMailer::$exceptions
PHPMailer::$From
PHPMailer::$FromName
PHPMailer::$Helo
PHPMailer::$Host
PHPMailer::$Hostname
PHPMailer::$language
PHPMailer::$LE
PHPMailer::$Mailer
PHPMailer::$MessageID
PHPMailer::$message_type
PHPMailer::$MIMEBody
PHPMailer::$MIMEHeader
PHPMailer::$Password
PHPMailer::$PluginDir
PHPMailer::$Port
PHPMailer::$Priority
PHPMailer::$ReplyTo
PHPMailer::$Sender
PHPMailer::$Sendmail
PHPMailer::$SentMIMEMessage
PHPMailer::$sign_cert_file
PHPMailer::$sign_key_file
PHPMailer::$sign_key_pass
PHPMailer::$SingleTo
PHPMailer::$SingleToArray
PHPMailer::$smtp
PHPMailer::$SMTPAuth
PHPMailer::$SMTPDebug
PHPMailer::$SMTPKeepAlive
PHPMailer::$SMTPSecure
PHPMailer::$Subject
PHPMailer::$Timeout
PHPMailer::$to
PHPMailer::$Username
PHPMailer::$Version
PHPMailer::$WordWrap
PHPMailer::$XMailer
Methods
static method getInstance (line 57)

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'.

  • return: The global JMail object
  • since: 11.1
  • access: public
static JMail getInstance ([string $id = 'Joomla'])
  • string $id: The id string for the JMail instance [optional]
Constructor __construct (line 38)

Constructor

  • access: public
JMail __construct ()

Redefinition of:
PHPMailer::__construct()
Constructor
addAttachment (line 275)

Add file attachments to the email

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail addAttachment (mixed $attachment, [mixed $name = ''], [mixed $encoding = 'base64'], [mixed $type = 'application/octet-stream'])
  • mixed $attachment: Either a string or array of strings [filenames]
  • mixed $name: Either a string or array of strings [names]
  • mixed $encoding: The encoding of the attachment
  • mixed $type: The mime type
addBCC (line 240)

Add blind carbon copy recipients to the email

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail addBCC (mixed $bcc, [mixed $name = ''])
  • mixed $bcc: Either a string or array of strings [email address(es)]
  • mixed $name: Either a string or array of strings [name(s)]
addCC (line 207)

Add carbon copy recipients to the email

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail addCC (mixed $cc, [mixed $name = ''])
  • mixed $cc: Either a string or array of strings [email address(es)]
  • mixed $name: Either a string or array of strings [name(s)]
addRecipient (line 177)

Add recipients to the email

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail addRecipient (mixed $recipient, [mixed $name = ''])
  • mixed $recipient: Either a string or array of strings [email address(es)]
  • mixed $name: Either a string or array of strings [name(s)]
addReplyTo (line 307)

Add Reply to email address(es) to the email

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail addReplyTo (array $replyto, [mixed $name = ''])
  • array $replyto: Either an array or multi-array of form
    1. array([0=> email Address [1=> Name)
  • mixed $name: Either an array or single string
Send (line 74)

Send the mail

  • return: True if successful, a JError object otherwise
  • since: 11.1
  • access: public
mixed Send ()

Redefinition of:
PHPMailer::Send()
Creates message and assigns Mailer. If the message is not sent successfully then it returns false. Use the ErrorInfo variable to view description of the error.
sendAdminMail (line 468)

Sends mail to administrator for approval of a user submission

  • return: True on success
  • since: 11.1
  • access: public
boolean sendAdminMail (string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, [string $url = null])
  • 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: A URL to included in the mail
sendMail (line 417)

Function to send an email

  • return: True on success
  • since: 11.1
  • access: public
boolean sendMail (string $from, string $fromName, mixed $recipient, string $subject, string $body, [boolean $mode = false], [mixed $cc = null], [mixed $bcc = null], [mixed $attachment = null], [mixed $replyTo = null], [mixed $replyToName = null])
  • 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)
setBody (line 156)

Set the email body

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail setBody (string $content)
  • string $content: Body of the email
setSender (line 102)

Set the email sender

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail setSender (array $from)
  • array $from: email address and Name of sender
    1. array([0=> email Address [1=> Name)
setSubject (line 140)

Set the email subject

  • return: Returns this object for chaining.
  • since: 11.1
  • access: public
JMail setSubject (string $subject)
  • string $subject: Subject of the email
useSendmail (line 338)

Use sendmail for sending the email

  • return: True on success
  • since: 11.1
  • access: public
boolean useSendmail ([string $sendmail = null])
  • string $sendmail: Path to sendmail [optional]
useSMTP (line 370)

Use SMTP for sending the email

  • return: True on success
  • since: 11.1
  • access: public
boolean useSMTP ([string $auth = null], [string $host = null], [string $user = null], [string $pass = null], [string $secure = null], [integer $port = 25])
  • string $auth: SMTP Authentication [optional]
  • string $host: SMTP Host [optional]
  • string $user: SMTP Username [optional]
  • string $pass: SMTP Password [optional]
  • string $secure: Use secure methods
  • integer $port: The SMTP port

Inherited Methods

Inherited From PHPMailer

PHPMailer::__construct()
PHPMailer::AddAddress()
PHPMailer::AddAnAddress()
PHPMailer::AddAttachment()
PHPMailer::AddBCC()
PHPMailer::AddCC()
PHPMailer::AddCustomHeader()
PHPMailer::AddEmbeddedImage()
PHPMailer::AddrAppend()
PHPMailer::AddReplyTo()
PHPMailer::AddrFormat()
PHPMailer::AddStringAttachment()
PHPMailer::AddStringEmbeddedImage()
PHPMailer::AlternativeExists()
PHPMailer::AttachAll()
PHPMailer::AttachmentExists()
PHPMailer::Base64EncodeWrapMB()
PHPMailer::ClearAddresses()
PHPMailer::ClearAllRecipients()
PHPMailer::ClearAttachments()
PHPMailer::ClearBCCs()
PHPMailer::ClearCCs()
PHPMailer::ClearCustomHeaders()
PHPMailer::ClearReplyTos()
PHPMailer::CreateBody()
PHPMailer::CreateHeader()
PHPMailer::DKIM_Add()
PHPMailer::DKIM_BodyC()
PHPMailer::DKIM_HeaderC()
PHPMailer::DKIM_QP()
PHPMailer::DKIM_Sign()
PHPMailer::doCallback()
PHPMailer::EncodeFile()
PHPMailer::EncodeHeader()
PHPMailer::EncodeQ()
PHPMailer::EncodeQP()
PHPMailer::EncodeQPphp()
PHPMailer::EncodeString()
PHPMailer::EndBoundary()
PHPMailer::FixEOL()
PHPMailer::GetAttachments()
PHPMailer::GetBoundary()
PHPMailer::GetMailMIME()
PHPMailer::GetSentMIMEMessage()
PHPMailer::GetTranslations()
PHPMailer::HasMultiBytes()
PHPMailer::HeaderLine()
PHPMailer::InlineImageExists()
PHPMailer::IsError()
PHPMailer::IsHTML()
PHPMailer::IsMail()
PHPMailer::IsQmail()
PHPMailer::IsSendmail()
PHPMailer::IsSMTP()
PHPMailer::Lang()
PHPMailer::MailSend()
PHPMailer::MsgHTML()
PHPMailer::PostSend()
PHPMailer::PreSend()
PHPMailer::RFCDate()
PHPMailer::SecureHeader()
PHPMailer::Send()
PHPMailer::SendmailSend()
PHPMailer::ServerHostname()
PHPMailer::set()
PHPMailer::SetError()
PHPMailer::SetFrom()
PHPMailer::SetLanguage()
PHPMailer::SetMessageType()
PHPMailer::SetWordWrap()
PHPMailer::Sign()
PHPMailer::SmtpClose()
PHPMailer::SmtpConnect()
PHPMailer::SmtpSend()
PHPMailer::TextLine()
PHPMailer::UTF8CharBoundary()
PHPMailer::ValidateAddress()
PHPMailer::WrapText()
PHPMailer::_mime_types()
Class Constants

Documentation generated on Mon, 25 Jun 2012 13:56:30 -0500 by phpDocumentor 1.4.4