Tariqa SOAP
 All Data Structures Namespaces Files Functions Variables Enumerations
mSmtp Class Reference
Inheritance diagram for mSmtp:
EC_SMTP

Public Member Functions

 __construct ($sender, $smtp_address, $smtp_port=25)
 setSMTPServer ($smtp_address="localhost", $smtp_port=25)
 setFrom ($from_address)
 setReturnAddress ($return_address)
 setRecipients ($recipients)
 addRecipients ($recipients)
 setCC ($cc)
 addCC ($cc)
 setBCC ($bcc)
 addBCC ($bcc)
 setSubject ($string)
 setPriority ($priority=mSmtp::MMAIL_PRIORITY_NORMAL)
 setMessage ($content, $type=mSmtp::MMAIL_TYPE_HTML, $encoding=mSmtp::MMAIL_ENCODING_UTF8, $xfertEncoding=mSmtp::MMAIL_TRANSFER_ENCODING_8BIT)
 addAttachment ($file, $name=false, $mime_type=false, $isData=false, $cid=null)
 send ()

Static Public Member Functions

static testEmailAddress ($address, $rfc_allowed_length=true, $rfc_allowed_characters=true)

Data Fields

const MMAIL_PRIORITY_LOWEST = 5
const MMAIL_PRIORITY_LOW = 4
const MMAIL_PRIORITY_NORMAL = 3
const MMAIL_PRIORITY_HIGH = 2
const MMAIL_PRIORITY_HIGHEST = 1
const MMAIL_TYPE_TEXT = "text/plain"
const MMAIL_TYPE_HTML = "text/html"
const MMAIL_TYPE_IMAGE_JPG = "image/jpg"
const MMAIL_TYPE_IMAGE_GIF = "image/gif"
const MMAIL_ENCODING_UTF8 = "UTF-8"
const MMAIL_ENCODING_ISO88591 = "ISO-8859-1"
const MMAIL_TRANSFER_ENCODING_8BIT = "8bit"
const MMAIL_TRANSFER_ENCODING_7BIT = "7bit"
const MMAIL_TRANSFER_ENCODING_BASE64 = "base64"

Constructor & Destructor Documentation

__construct ( sender,
smtp_address,
smtp_port = 25 
)

Constructor public


Member Function Documentation

addAttachment ( file,
name = false,
mime_type = false,
isData = false,
cid = null 
) [final]

Add an attachment to the message

Parameters:
string$fileEither the Full path to the file to attach, either the data to attach itself
string$nameFilename to use in the message
string$mime_typeMime type of the file (if not set application/octet-stream will be used)
boolean$isDataFlag indicating if (when True) $file contains the data to attach, or (when false) if it is the path to a file to attach.
string$cidAttachment identifier (If not provided, it will be automatically generated)
Returns:
string The Attachment's ID. You can use it to embed the attachment in the body of your message, using the syntax
public
addBCC ( bcc) [final]

Add "blind carbon copy" recipients to the mail

Parameters:
array | string$bccThe e-mail address of the recipient, or an array of email addresses to add public
addCC ( cc) [final]

Add "carbon copy" recipients to the mail

Parameters:
array | string$ccThe e-mail address of the recipient, or an array of email addresses to add public
addRecipients ( recipients) [final]

Add recipients to the mail

Parameters:
array | string$recipientsThe e-mail address of the recipient, or an array of email addresses to add public
send ( ) [final]

Send the message public

setBCC ( bcc) [final]

Set the list of "blind carbon copy" recipients of the mail

Parameters:
array | string$bccThe e-mail address of the recipient, or an array of email addresses public
setCC ( cc) [final]

Set the list of "carbon copy" recipients of the mail

Parameters:
array | string$ccThe e-mail address of the recipient, or an array of email addresses public
setFrom ( from_address) [final]

Set the address from which this e-mail wiil be send

Parameters:
string$from_addressE-mail address the recipient will see as beeing the sender of this e-mail public
setMessage ( content,
type = mSmtp::MMAIL_TYPE_HTML,
encoding = mSmtp::MMAIL_ENCODING_UTF8,
xfertEncoding = mSmtp::MMAIL_TRANSFER_ENCODING_8BIT 
) [final]

Set the body of the message

Parameters:
string$contentContent of the message
string$typeMime type of the message (default is MMAIL_TYPE_HTML)
string$encodingCharacter encoding to use (default is MMAIL_ENCODING_UTF8)
string$xfertEncodingContent-Transfer-Encoding to use (default is MMAIL_TRANSFER_ENCODING_8BIT)
See also:
MMAIL_TYPE_TEXT
MMAIL_TYPE_HTML
MMAIL_ENCODING_UTF8
MMAIL_ENCODING_ISO88591
MMAIL_TRANSFER_ENCODING_8BIT
MMAIL_TRANSFER_ENCODING_7BIT
MMAIL_TRANSFER_ENCODING_BASE64 public
setPriority ( priority = mSmtp::MMAIL_PRIORITY_NORMAL) [final]

Set the priority level of the message

Parameters:
int$priorityMessage's priority
See also:
MMAIL_PRIORITY_LOWEST
MMAIL_PRIORITY_LOW
MMAIL_PRIORITY_NORMAL
MMAIL_PRIORITY_HIGH
MMAIL_PRIORITY_HIGHEST) public
setRecipients ( recipients) [final]

Set the list of recipients of the mail

Parameters:
array | string$recipientsThe e-mail address of the recipient, or an array of email addresses public
setReturnAddress ( return_address) [final]

Set the address that the receiver will have to use to reply to your mail (its mail client will then ignore the 'from' address)

Parameters:
string$return_addressE-mail address the recipient should use to reply to the mail public
setSMTPServer ( smtp_address = "localhost",
smtp_port = 25 
) [final]

Set the SMTP Server Host

Parameters:
string$smtp_addressSMTP Server public
setSubject ( string) [final]

Set the subject of the message

Parameters:
string$stringThe subject of the message public
static testEmailAddress ( address,
rfc_allowed_length = true,
rfc_allowed_characters = true 
) [static]

Test the format of an email address, according to RFC 2822 and 2821

Parameters:
string$address
Returns:
boolean

Field Documentation

const MMAIL_ENCODING_ISO88591 = "ISO-8859-1"

The mail's content encoding is ISO-8859-1

const MMAIL_ENCODING_UTF8 = "UTF-8"

The mail's content encoding is utf-8

e-mail high priority

e-mail highest priority

const MMAIL_PRIORITY_LOW = 4

e-mail low priority

e-mail lowest priority

e-mail normal priority

The mail's encoding mechanism is '7 bit'

The mail's encoding mechanism is '8 bit'

The mail's encoding mechanism is 'base 64'

const MMAIL_TYPE_HTML = "text/html"

The mail's content type is HTML

const MMAIL_TYPE_IMAGE_GIF = "image/gif"

The mail's content type is gif

const MMAIL_TYPE_IMAGE_JPG = "image/jpg"

The mail's content type is jpeg

const MMAIL_TYPE_TEXT = "text/plain"

The mail's content type is text


The documentation for this class was generated from the following file: