XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
Mail Class Reference
Inheritance diagram for Mail:

Public Member Functions

 __construct ()
 
 useGmailAccount ($account_name, $account_passwd)
 
 useSMTP ($auth=NULL, $host=NULL, $user=NULL, $pass=NULL, $secure=NULL, $port=25)
 
 setAdditionalParams ($additional_params)
 
 addAttachment ($filename, $orgfilename)
 
 addCidAttachment ($filename, $cid)
 
 setSender ($name, $email)
 
 getSender ()
 
 setReceiptor ($name, $email)
 
 getReceiptor ()
 
 setTitle ($title)
 
 getTitle ()
 
 setBCC ($bcc)
 
 setMessageID ($messageId)
 
 setReferences ($references)
 
 setReplyTo ($replyTo)
 
 setContent ($content)
 
 replaceResourceRealPath ($matches)
 
 getPlainContent ()
 
 getHTMLContent ()
 
 setContentType ($mode= 'html')
 
 procAttachments ()
 
 procCidAttachments ()
 
 send ()
 
 checkMailMX ($email_address)
 
 isVaildMailAddress ($email_address)
 
 returnMIMEType ($filename)
 

Public Attributes

 $sender_name = ''
 
 $sender_email = ''
 
 $receiptor_name = ''
 
 $receiptor_email = ''
 
 $title = ''
 
 $content = ''
 
 $content_type = 'html'
 
 $messageId = NULL
 
 $replyTo = NULL
 
 $bcc = NULL
 
 $attachments = array()
 
 $cidAttachments = array()
 
 $mainMailPart = NULL
 
 $body = ''
 
 $header = ''
 
 $eol = ''
 
 $references = ''
 
 $additional_params = NULL
 
 $use_smtp = FALSE
 

Detailed Description

Mailing class for XpressEngine

Author
NAVER (devel.nosp@m.oper.nosp@m.s@xpr.nosp@m.esse.nosp@m.ngine.nosp@m..com)

Definition at line 11 of file Mail.class.php.

Constructor & Destructor Documentation

Mail::__construct ( )

Constructor function

Returns
void

Definition at line 133 of file Mail.class.php.

Member Function Documentation

Mail::addAttachment (   $filename,
  $orgfilename 
)

Add file attachment

Parameters
string$filenameFile name to attach
string$orgfilenameReal path of file to attach
Returns
void

Definition at line 219 of file Mail.class.php.

Mail::addCidAttachment (   $filename,
  $cid 
)

Add content attachment

Parameters
string$filenameReal path of file to attach
string$cidContent-CID
Returns
void

Definition at line 231 of file Mail.class.php.

Mail::checkMailMX (   $email_address)

Check if DNS of param is real or fake

Parameters
string$email_addressEmail address
Returns
boolean TRUE if param is valid DNS otherwise FALSE

Definition at line 595 of file Mail.class.php.

Mail::getHTMLContent ( )

Get the HTML content of body message

Returns
string

Definition at line 436 of file Mail.class.php.

Mail::getPlainContent ( )

Get the Plain content of body message

Returns
string

Definition at line 426 of file Mail.class.php.

Mail::getReceiptor ( )

Get Receiptor (TO:)

Returns
string

Definition at line 295 of file Mail.class.php.

Mail::getSender ( )

Get Sender (From:)

Returns
string

Definition at line 261 of file Mail.class.php.

Mail::getTitle ( )

Get Email's Title

Returns
string

Definition at line 327 of file Mail.class.php.

Mail::isVaildMailAddress (   $email_address)

Check if param is a valid email or not

Parameters
string$email_addressEmail address
Returns
string email address if param is valid email address otherwise blank string

Definition at line 622 of file Mail.class.php.

Mail::procAttachments ( )

Process the images from attachments

Returns
void

Definition at line 457 of file Mail.class.php.

Mail::procCidAttachments ( )

Process the images from body content. This functions is used if Mailer is set as mail not as SMTP

Returns
void

Definition at line 507 of file Mail.class.php.

Mail::replaceResourceRealPath (   $matches)

Replace resourse path of the files

See Also
Mail::setContent()
Parameters
array$matchesMatch info.
Returns
string

Definition at line 416 of file Mail.class.php.

Mail::returnMIMEType (   $filename)

Gets the MIME type of param

Parameters
string$filenamefilename
Returns
string MIME type of ext

Definition at line 640 of file Mail.class.php.

Mail::send ( )

Send email

Returns
bool TRUE in case of success, FALSE if sending fails

Definition at line 544 of file Mail.class.php.

Mail::setAdditionalParams (   $additional_params)

Set additional parameters

Parameters
string$additional_paramsAdditional parameters
Returns
void

Definition at line 207 of file Mail.class.php.

Mail::setBCC (   $bcc)

Set BCC

Parameters
string$bcc
Returns
void

Definition at line 338 of file Mail.class.php.

Mail::setContent (   $content)

Set message content

Parameters
string$contentContent
Returns
void

Definition at line 396 of file Mail.class.php.

Mail::setContentType (   $mode = 'html')

Set the type of body's content

Parameters
string$mode
Returns
void

Definition at line 447 of file Mail.class.php.

Mail::setMessageID (   $messageId)

Set Message ID

Parameters
string$messageId
Returns
void

Definition at line 356 of file Mail.class.php.

Mail::setReceiptor (   $name,
  $email 
)

Set Receiptor (TO:)

Parameters
string$nameReceiptor name
string$emailReceiptor email address
Returns
void

Definition at line 277 of file Mail.class.php.

Mail::setReferences (   $references)

Set references

Parameters
string$references
Returns
void

Definition at line 367 of file Mail.class.php.

Mail::setReplyTo (   $replyTo)

Set ReplyTo param

Parameters
string$replyTo
Returns
void

Definition at line 378 of file Mail.class.php.

Mail::setSender (   $name,
  $email 
)

Set Sender (From:)

Parameters
string$nameSender name
string$emailSender email address
Returns
void

Definition at line 243 of file Mail.class.php.

Mail::setTitle (   $title)

Set Email's Title

Parameters
string$titleTitle to set
Returns
void

Definition at line 310 of file Mail.class.php.

Mail::useGmailAccount (   $account_name,
  $account_passwd 
)

Set parameters for using Gmail

Parameters
string$account_namePassword
string$account_passwdSecure method ('ssl','tls')
Returns
void

Definition at line 145 of file Mail.class.php.

Mail::useSMTP (   $auth = NULL,
  $host = NULL,
  $user = NULL,
  $pass = NULL,
  $secure = NULL,
  $port = 25 
)

Set parameters for using SMTP protocol

Parameters
bool$authSMTP authentication
string$hostSMTP host address
string$userSMTP user id
string$passSTMP user password
string$securemethod ('ssl','tls')
int$portSTMP port
Returns
bool TRUE if SMTP is set correct, otherwise return FALSE

Definition at line 175 of file Mail.class.php.

Member Data Documentation

Mail::$additional_params = NULL

Definition at line 120 of file Mail.class.php.

Mail::$attachments = array()

Definition at line 78 of file Mail.class.php.

Mail::$bcc = NULL

Definition at line 72 of file Mail.class.php.

Mail::$body = ''

Definition at line 96 of file Mail.class.php.

Mail::$cidAttachments = array()

Definition at line 84 of file Mail.class.php.

Mail::$content = ''

Definition at line 48 of file Mail.class.php.

Mail::$content_type = 'html'

Definition at line 54 of file Mail.class.php.

Mail::$eol = ''

Definition at line 108 of file Mail.class.php.

Mail::$header = ''

Definition at line 102 of file Mail.class.php.

Mail::$mainMailPart = NULL

Definition at line 90 of file Mail.class.php.

Mail::$messageId = NULL

Definition at line 60 of file Mail.class.php.

Mail::$receiptor_email = ''

Definition at line 36 of file Mail.class.php.

Mail::$receiptor_name = ''

Definition at line 30 of file Mail.class.php.

Mail::$references = ''

Definition at line 114 of file Mail.class.php.

Mail::$replyTo = NULL

Definition at line 66 of file Mail.class.php.

Mail::$sender_email = ''

Definition at line 24 of file Mail.class.php.

Mail::$sender_name = ''

Definition at line 18 of file Mail.class.php.

Mail::$title = ''

Definition at line 42 of file Mail.class.php.

Mail::$use_smtp = FALSE

Definition at line 126 of file Mail.class.php.


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