* @license PHP License * @package wombat * @subpackage MailMime */ /** * Wombat Mail Mime Sendable * * Interface of classes that allow to send e-mails * * @version 0.2.0 * @package wombat * @subpackage MailMime */ interface WBMail_Sendable { /** * Fetch mail id * * @return string */ public function getId(); /** * Set mail id * * @param string $id */ public function setId($id = '__new'); /** * Fet e-mail date * * Get date in ISO format * * @return string */ public function getDate(); /** * Set e-mail's data * * Set date in ISO format * * @param string */ public function setDate($timestamp); /** * Get e-mail subject * * @return string */ public function getSubject(); /** * Set e-mail subject * * @param string $subject */ public function setSubject($subject); /** * Get e-mail recipient * * @return WBMail_Part_Address */ public function getRcpt(); /** * Set e-mail recipient * * @param WBMail_Mime_Part_Address */ public function setRcpt(WBMail_Mime_Part_Address $rcpt); /** * Get e-mail from address * * @return WBMail_Part_Address */ public function getFrom(); /** * Set e-mail from address * * @param WBMail_Mime_Part_Address */ public function SetFrom(WBMail_Mime_Part_Address $from); /** * Get e-mail's plain text body * * @return string */ public function getPlainBody(); /** * Set e-mail's plain body * * @param string */ public function setPlainBody($text); /** * Get e-mail's HTML body * * @return string */ public function getHtmlBody(); /** * Set e-mail's HTML body * * @param string $html */ public function setHtmlBody($html); /** * Add attachment to email * * @param WBMail_Mime_Part_Attachment $att */ public function addAttachment(WBMail_Mime_Part_Attachment $att); /** * Get number of attachments * * @return int */ public function countAttachments(); /** * Receive attachment * * Get e-mail attachment object * * @param int $index * @return WBMail_Part_Attachment */ public function getAttachment($index); /** * Get current attachments * * @return array WBMail_Part_Attachment */ public function getAttachments(); /** * Get removed attachments * * @return array WBMail_Part_Attachment */ public function getDeletedAttachments(); /** * Remove attachment * * Remove attachment from actual container * * @param int $index */ public function deleteAttachment($index); }