Class JMail

Description

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

Located in /mail/mail.php (line 24)

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

Constructor

JMail JMail ()
addAttachment (line 219)

Add file attachments to the email

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

Add blind carbon copy recipients to the email

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

Add carbon copy recipients to the email

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

Add recipients to the email

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

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

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

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.1
  • access: public
  • static:
object The &getInstance ([string $id = 'Joomla'])
  • string $id: The id string for the JMail instance [optional]
setBody (line 132)

Set the E-Mail body

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

Set the E-Mail sender

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

Set the E-Mail subject

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

Use sendmail for sending the e-mail

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

Use SMTP for sending the e-mail

  • return: True on success
  • since: 1.1
  • 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]

Documentation generated on Sat, 4 Feb 2006 14:24:16 +0100 by phpDocumentor 1.3.0RC4