phpCoreLib2
[ class tree: phpCoreLib2 ] [ index: phpCoreLib2 ] [ all elements ]

Class: DMailSend

Source Location: /Mails/DMailSend.php

Class Overview

DObject
   |
   --DMailingAbstract
      |
      --DMailSend

SMTP send mail class


Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: DMailingAbstract

DMailingAbstract::DMailingAbstract()
Constructor
DMailingAbstract::AddAddress()
Adds a "To" address.
DMailingAbstract::AddBCC()
Adds a "Bcc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
DMailingAbstract::AddCC()
Adds a "Cc" address. Note: this function works with the SMTP mailer on win32, not with the "mail" mailer.
DMailingAbstract::AddReplyTo()
Adds a "Reply-To" address.
DMailingAbstract::HeaderLine()
DMailingAbstract::_errorHandling()
Handling returned error

Class: DObject

DObject::__construct()
Constructor
DObject::debug()
Debig
DObject::getClassMembers()
Gets member variables of the instance
DObject::getClassMemberType()
Gets class member type
DObject::getClassMethods()
Gets classes of the class
DObject::getClassName()
Gets class name
DObject::PHPSerialize()
Gets serialized string of the class
DObject::trace()
Trace
DObject::__destruct()
Descructor
DObject::__toString()
Returns String equivalent of the object.

Class Details

[line 16]
SMTP send mail class



[ Top ]


Class Variables

$AltBody =  ''

[line 92]

Sets the text-only body of the message. This automatically sets the email to multipart/alternative. This body can be read by mail clients that do not have HTML email capability such as mutt. Clients that can read HTML will view the normal Body.


Type:   string
Overrides:   Array


[ Top ]

$Body =  ''

[line 83]

Sets the Body of the message. This can be either an HTML or text body.

If HTML then run IsHTML(true).



Type:   string
Overrides:   Array


[ Top ]

$CharSet =  'iso-8859-1'

[line 32]

Sets the CharSet of the message.


Type:   string
Overrides:   Array


[ Top ]

$ConfirmReadingTo =  ''

[line 117]

Sets the email address that a reading confirmation will be sent.


Type:   string
Overrides:   Array


[ Top ]

$ContentType =  'text/plain'

[line 38]

Sets the Content-type of the message.


Type:   string
Overrides:   Array


[ Top ]

$Encoding =  '8bit'

[line 45]

Sets the Encoding of the message. Options for this are "8bit", "7bit", "binary", "base64", and "quoted-printable".


Type:   string
Overrides:   Array


[ Top ]

$ErrorInfo =  ''

[line 51]

Holds the most recent mailer error message.


Type:   string
Overrides:   Array


[ Top ]

$From =  'nobody@localhost'

[line 57]

Sets the From email address for the message.


Type:   string
Overrides:   Array


[ Top ]

$FromName =  'Nobody User'

[line 63]

Sets the From name of the message.


Type:   string
Overrides:   Array


[ Top ]

$Hostname =  ''

[line 125]

Sets the hostname to use in Message-Id and Received headers and as default HELO string. If empty, the value returned by SERVER_NAME is used or 'localhost.localdomain'.


Type:   string
Overrides:   Array


[ Top ]

$Mailer =  'mail'

[line 105]

Method to send mail: ("mail", "sendmail", or "smtp").


Type:   string
Overrides:   Array


[ Top ]

$Priority =  3

[line 26]

Email priority (1 = High, 3 = Normal, 5 = low).


Type:   int
Overrides:   Array


[ Top ]

$Sender =  ''

[line 70]

Sets the Sender email (Return-Path) of the message. If not empty, will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.


Type:   string
Overrides:   Array


[ Top ]

$Sendmail =  '/usr/sbin/sendmail'

[line 111]

Sets the path of the sendmail program.


Type:   string
Overrides:   Array


[ Top ]

$Subject =  ''

[line 76]

Sets the Subject of the message.


Type:   string
Overrides:   Array


[ Top ]

$WordWrap =  0

[line 99]

Sets word wrapping on the body of the message to a given number of characters.


Type:   int
Overrides:   Array


[ Top ]

$_attachment = array()

[line 138]


Type:   mixed
Overrides:   Array


[ Top ]

$_bcc = array()

[line 136]


Type:   mixed
Overrides:   Array


[ Top ]

$_boundary = array()

[line 141]


Type:   mixed
Overrides:   Array


[ Top ]

$_cc = array()

[line 135]


Type:   mixed
Overrides:   Array


[ Top ]

$_CustomHeader = array()

[line 139]


Type:   mixed
Overrides:   Array


[ Top ]

$_error_count =  0

[line 143]


Type:   mixed
Overrides:   Array


[ Top ]

$_language = array()

[line 142]


Type:   mixed
Overrides:   Array


[ Top ]

$_LE =  "\n"

[line 144]


Type:   mixed
Overrides:   Array


[ Top ]

$_message_type =  ''

[line 140]


Type:   mixed
Overrides:   Array


[ Top ]

$_ReplyTo = array()

[line 137]


Type:   mixed
Overrides:   Array


[ Top ]

$_smtp =  NULL

[line 133]


Type:   mixed
Overrides:   Array


[ Top ]

$_to = array()

[line 134]


Type:   mixed
Overrides:   Array


[ Top ]



Class Methods


method AddAttachment [line 697]

bool AddAttachment( string $path, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream'])

Adds an attachment from a path on the filesystem.

Returns false if the file could not be found or accessed.




Parameters:

string   $path   Path to the attachment.
string   $name   Overrides the attachment name.
string   $encoding   File encoding (see $Encoding).
string   $type   File extension (MIME) type.

[ Top ]

method AddCustomHeader [line 1038]

void AddCustomHeader( $custom_header)

Adds a custom header.



Parameters:

   $custom_header  

[ Top ]

method AddEmbeddedImage [line 870]

bool AddEmbeddedImage( string $path, string $cid, [string $name = ''], [string $encoding = 'base64'], [string $type = 'application/octet-stream'])

Adds an embedded attachment. This can include images, sounds, and just about any other document. Make sure to set the $type to an image type. For JPEG images use "image/jpeg" and for GIF images use "image/gif".



Parameters:

string   $path   Path to the attachment.
string   $cid   Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form.
string   $name   Overrides the attachment name.
string   $encoding   File encoding (see $Encoding).
string   $type   File extension (MIME) type.

[ Top ]

method AddStringAttachment [line 844]

void AddStringAttachment( string $string, string $filename, [string $encoding = 'base64'], [string $type = 'application/octet-stream'])

Adds a string or binary attachment (non-filesystem) to the list.

This method can be used to attach ascii or binary data, such as a BLOB record from a database.




Parameters:

string   $string   String attachment data.
string   $filename   Name of the attachment.
string   $encoding   File encoding (see $Encoding).
string   $type   File extension (MIME) type.

[ Top ]

method ClearAddresses [line 921]

void ClearAddresses( )

Clears all recipients assigned in the TO array. Returns void.



[ Top ]

method ClearAllRecipients [line 954]

void ClearAllRecipients( )

Clears all recipients assigned in the TO, CC and BCC array. Returns void.



[ Top ]

method ClearAttachments [line 965]

void ClearAttachments( )

Clears all previously set filesystem, string, and binary attachments. Returns void.



[ Top ]

method ClearBCCs [line 937]

void ClearBCCs( )

Clears all recipients assigned in the BCC array. Returns void.



[ Top ]

method ClearCCs [line 929]

void ClearCCs( )

Clears all recipients assigned in the CC array. Returns void.



[ Top ]

method ClearCustomHeaders [line 973]

void ClearCustomHeaders( )

Clears all custom headers. Returns void.



[ Top ]

method ClearReplyTos [line 945]

void ClearReplyTos( )

Clears all recipients assigned in the ReplyTo array. Returns void.



[ Top ]

method getFile [line 1196]

void getFile( string $filename)

Read a file from a supplied filename and return it.



Tags:

access:  public


Parameters:

string   $filename   Parameter File Name

[ Top ]

method IsError [line 1028]

bool IsError( )

Returns true if an error occurred.



[ Top ]

method MsgHTML [line 1047]

$message MsgHTML( $message)

Evaluates the message and returns modifications for inline images and backgrounds



Tags:

access:  public


Parameters:

   $message  

[ Top ]

method Send [line 203]

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



[ Top ]

method set [line 1181]

void set( string $name, [mixed $value = ''])

Set (or reset) Class Objects (variables)

Usage Example: $page->set('X-Priority', '3');




Tags:

access:  public


Parameters:

string   $name   Parameter Name
mixed   $value   Parameter Value NOTE: will not work with arrays, there are no arrays to set/reset

[ Top ]

method SetHTML [line 155]

void SetHTML( bool $bool)

Sets message type to HTML.



Parameters:

bool   $bool  

[ Top ]

method SetLanguage [line 468]

bool SetLanguage( string $lang_type, [string $lang_path = 'language/'])

Sets the language for all class error messages. Returns false if it cannot load the language file. The default language type is English.



Tags:

access:  public


Parameters:

string   $lang_type   Type of language (e.g. Portuguese: "br")
string   $lang_path   Path to the language file directory

[ Top ]

method SetMail [line 175]

void SetMail( )

Sets Mailer to send message using PHP mail() function.



[ Top ]

method SetQmail [line 191]

void SetQmail( )

Sets Mailer to send message using the qmail MTA.



[ Top ]

method SetSendmail [line 183]

void SetSendmail( )

Sets Mailer to send message using the $Sendmail program.



[ Top ]

method SetSMTP [line 167]

void SetSMTP( )

Sets Mailer to send message using SMTP.



[ Top ]

method SmtpClose [line 450]

void SmtpClose( )

Closes the active SMTP session if one exists.



[ Top ]


Documentation generated on Sat, 17 Apr 2010 22:07:49 +0300 by phpDocumentor 1.4.3