Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JMail

Description

E-Mail Class. Provides a common interface to send e-mail from the Joomla! Framework

  • copyright: 2001 - 2003 Brent R. Matzelle
  • since: 1.5
  • author: Louis Landry <[email protected]>

Located in /joomla/utilities/mail.php (line 28)

Class PHPMailer   (Package PHPMailer)

Class JMail   (Subpackage Utilities)
Method Summary
Static method static object The &getInstance ([string $id = 'Joomla'])
Constructor JMail JMail ()
Method void addAttachment (mixed $attachment)
Method void addBCC ( $bcc, mixed $cc)
Method void addCC (mixed $cc)
Method void addRecipient (mixed $recipient)
Method void addReplyTo ( $replyto, array $reply)
Method mixed &Send ()
Method void setBody (string $content)
Method void setSender (array $from)
Method void setSubject (string $subject)
Method boolean useSendmail ([string $sendmail = null])
Method boolean useSMTP ([string $auth = null], [string $host = null], [string $user = null], [string $pass = null])
Methods
Constructor JMail (line 35)

Constructor

JMail JMail ()
addAttachment (line 224)

Add file attachments to the email

  • since: 1.5
  • access: public
void addAttachment (mixed $attachment)
  • mixed $attachment: Either a string or array of strings [filenames]
addBCC (line 199)

Add blind carbon copy recipients to the email

  • since: 1.5
  • access: public
void addBCC ( $bcc, mixed $cc)
  • mixed $cc: Either a string or array of strings [e-mail address(es)]
  • $bcc
addCC (line 174)

Add carbon copy recipients to the email

  • since: 1.5
  • access: public
void addCC (mixed $cc)
  • mixed $cc: Either a string or array of strings [e-mail address(es)]
addRecipient (line 151)

Add recipients to the email

  • since: 1.5
  • access: public
void addRecipient (mixed $recipient)
  • mixed $recipient: Either a string or array of strings [e-mail address(es)]
addReplyTo (line 250)

Add Reply to e-mail address(es) to the e-mail

  • since: 1.5
  • access: public
void addReplyTo ( $replyto, array $reply)
  • array $reply: Either an array or multi-array of form
                 array( [0] => E-Mail Address [1] => Name )
  • $replyto
getInstance (line 57)

Returns a reference to a global e-mail object, only creating it if it doesn't already exist.

This method must be invoked as:

  $mail =& JMail::getInstance();

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: global JMail object
  • since: 1.5
  • access: public
object The &getInstance ([string $id = 'Joomla'])
  • string $id: The id string for the JMail instance [optional]
Send (line 75)
  • return: True if successful, a JError object otherwise
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.
setBody (line 134)

Set the E-Mail body

  • since: 1.5
  • access: public
void setBody (string $content)
  • string $content: Body of the e-mail
setSender (line 98)

Set the E-Mail sender

  • since: 1.5
  • access: public
void setSender (array $from)
  • array $from: E-Mail address and Name of sender
                 array( [0] => E-Mail Address [1] => Name )
setSubject (line 122)

Set the E-Mail subject

  • since: 1.5
  • access: public
void setSubject (string $subject)
  • string $subject: Subject of the e-mail
useSendmail (line 275)

Use sendmail for sending the e-mail

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

Use SMTP for sending the e-mail

  • return: True on success
  • since: 1.5
  • access: public
boolean useSMTP ([string $auth = null], [string $host = null], [string $user = null], [string $pass = null])
  • string $auth: SMTP Authentication [optional]
  • string $host: SMTP Host [optional]
  • string $user: SMTP Username [optional]
  • string $pass: SMTP Password [optional]

Inherited Methods

Inherited From PHPMailer

 PHPMailer::AddAddress()
 PHPMailer::AddAttachment()
 PHPMailer::AddBCC()
 PHPMailer::AddCC()
 PHPMailer::AddCustomHeader()
 PHPMailer::AddEmbeddedImage()
 PHPMailer::AddReplyTo()
 PHPMailer::AddStringAttachment()
 PHPMailer::ClearAddresses()
 PHPMailer::ClearAllRecipients()
 PHPMailer::ClearAttachments()
 PHPMailer::ClearBCCs()
 PHPMailer::ClearCCs()
 PHPMailer::ClearCustomHeaders()
 PHPMailer::ClearReplyTos()
 PHPMailer::IsError()
 PHPMailer::IsHTML()
 PHPMailer::IsMail()
 PHPMailer::IsQmail()
 PHPMailer::IsSendmail()
 PHPMailer::IsSMTP()
 PHPMailer::Send()
 PHPMailer::SetLanguage()
 PHPMailer::SmtpClose()

Documentation generated on Mon, 05 Mar 2007 21:10:05 +0000 by phpDocumentor 1.3.1