Class CMail

Description

Composite Mail class is able to send multiple email with attachment using PHP::mail()

Located in /mail.php (line 27)


	
			
Variable Summary
array $attachments
string $bcc
string $body
string $cc
string $charset
mixed $debug
string $from
string $fromName
string $header
string $message
string $mime
bool $notify
array $priorities
integer $priority
string $returnPath
string $subject
string $to
Method Summary
static string getMimeType (string $file)
static bool isValidEmail (string $email)
CMail __construct ()
void addAttachment (string $filename, [string $inner_name = ""], [string $mime = ""])
void clear ()
string getInvalidEmail (mixed $email)
void send ([string $emailfile = ""])
void sendTo (string $to)
string stripnl (string $string)
Variables
array $attachments = array() (line 125)
  • var: each attachment is stored in this array
  • access: protected
string $bcc (line 59)
  • var: blind carbon copy
  • access: public
string $body (line 113)
  • var: email body
  • access: protected
string $cc (line 52)
  • var: carbon copy
  • access: public
string $charset (line 95)
  • var: email encoding (iso-8859-1 default)
  • access: public
mixed $debug (line 107)

$var bool $debug enable debug mode to display errors etc.

  • access: public
string $from (line 34)
  • var: your email
  • access: public
string $fromName (line 40)
  • var: your name
  • access: public
string $header (line 119)
  • var: email header
  • access: protected
string $message (line 89)
  • var: message text
  • access: public
string $mime (line 101)
  • var: Email mime type
  • access: public
bool $notify (line 83)
  • var: send back notification about reading
  • access: public
array $priorities = array(1 =>
'1 (Highest)',
'2 (High)',
'3 (Normal)',
'4 (Low)',
'5 (Lowest)')
(line 130)
  • var: priority with description
  • access: protected
integer $priority (line 71)
  • var: email priority 1-5 (3 standart)
  • access: public
string $returnPath (line 77)
  • var: override $to to this email for reply address
  • access: public
string $subject (line 65)
  • var: email subject
  • access: public
string $to (line 46)
  • var: target email
  • access: public
Methods
static method getMimeType (line 188)

return mime type for given file

  • return: mime-type for given file
  • access: public
static string getMimeType (string $file)
  • string $file: file name
static method isValidEmail (line 176)

Check if given email is valid

  • return: true if email is valid
  • access: public
static bool isValidEmail (string $email)
  • string $email: email to be checked
Constructor __construct (line 141)

constructor

  • access: public
CMail __construct ()
addAttachment (line 245)

add attachment encoded by base64

  • access: public
void addAttachment (string $filename, [string $inner_name = ""], [string $mime = ""])
  • string $filename: path to file on server
  • string $inner_name: file name displayed in email else filename
  • string $mime: own mime type if specified else get it from inner name
clear (line 150)

Set default attributes

  • access: public
void clear ()
clearAttachments (line 232)

delete all attachments for this email

  • access: public
void clearAttachments ()
getInvalidEmail (line 430)

Return invalid email if some else null

  • return: invalid email if any
  • access: protected
string getInvalidEmail (mixed $email)
  • mixed $email: email of array of emails to be checked
send (line 298)

Send email

  • access: public
void send ([string $emailfile = ""])
  • string $emailfile: if specified the current email will be also sent as attachment
sendTo (line 415)

Send email to 1 email only

  • access: protected
void sendTo (string $to)
  • string $to: target email
stripnl (line 287)

Strip NL

  • return: without white characters
  • access: protected
string stripnl (string $string)
  • string $string: to be stripped

Documentation generated on Thu, 12 Oct 2006 01:53:37 +0200 by phpDocumentor 1.3.0