Overview  Package  Tree cmsdAm 0.8

cmsdAm

Class cmsdam_mails

cmsdAm.cmsdam_mails

class cmsdam_mails

This is the cmsdAm email class.

NOTE: you can only send email messages! Is not possible to receive email messages using this class because is out of the design of cmsdAm handling incoming email messages. Attachments support is under developing, and it will be ready sood. Stay tuned!!

Class instance: $cms->mails

Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>

Field Summary
public var$http

You should not use this variable from your section.

public var$conf

You should not use this variable from your section.

public var$users

You should not use this variable from your section.

public var$logs

You should not use this variable from your section.

public var$debug

You should not use this variable from your section.

private var$_attfilenameStack

Private attachments filename stack Don't use from your sections!!

private var$_attfiledataStack

Private attachments filedata stack Don't use from your sections!!

Method Summary
public booladd_attach

Adds a new attachment to the mail.

public arraylist_attach

Return the array with the list of the attached file names.

public booldelete_attach

Delete the given attach file name from the attached files.

public boolsend_mail

This method sends a email message.

Field Detail

http

public var $http

You should not use this variable from your section.

HTTP class instance.


conf

public var $conf

You should not use this variable from your section.

Configuration class instance.


users

public var $users

You should not use this variable from your section.

Users class instance.


logs

public var $logs

You should not use this variable from your section.

Logs class instance.


debug

public var $debug

You should not use this variable from your section.

Debug class instance.


_attfilenameStack

private var $_attfilenameStack

Private attachments filename stack Don't use from your sections!!


_attfiledataStack

private var $_attfiledataStack

Private attachments filedata stack Don't use from your sections!!

Method Detail

add_attach()

public bool add_attach(str attstream,
                       str attname)

Adds a new attachment to the mail.

This method must be called first of send_mail if you want to add attachments to your mail.

Parameters:
attstream - Binary string that represent the raw attachment file stream
attname - Attachment file name
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
False on errors, True on success

list_attach()

public array list_attach()

Return the array with the list of the attached file names.

This method must be called first of send_mail if you want to add attachments to your mail.

Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
The list of the attached files

delete_attach()

public bool delete_attach(str attname)

Delete the given attach file name from the attached files.

This method must be called first of send_mail if you want to add attachments to your mail.

Parameters:
attname - Attachment file name
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
True on success, False on errors

send_mail()

public bool send_mail(str to,
                      str message,
                      str subject = "",
                      str from = "")

This method sends a email message.

You can use "$to" to define the destination mail address, "$message" is the mail message body, "$subject" is the mail subject, and from is the mail message you want the mail comes from.
Mail attachments support is under development, it will be ready soon!!
NOTE: Due to the ESMTP and PHP design this method is not capable to trap all possible errors, so it's still possible that you send a mail message throw this method, the mail doesn't arrive but this method return True.

Parameters:
to - Destination mail address
message - Mail message body
subject - Mail subject
from - Sender email address
Author:
dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net>
Returns:
False on errors, True on success

Overview  Package  Tree cmsdAm 0.8