diff --git a/email/Email.php b/email/Email.php index ee3821e08..1ec9607de 100755 --- a/email/Email.php +++ b/email/Email.php @@ -359,8 +359,15 @@ class Email extends ViewableData { return ereg('^([a-zA-Z0-9_+\.\-]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$', $address); } - /** - * @desc Send the email in plaintext + /** + * Send the email in plaintext. + * + * @see send() for sending emails with HTML content. + * @uses Mailer->sendPlain() + * + * @param string $messageID Optional message ID so the message can be identified in bounces etc. + * @return bool Success of the sending operation from an MTA perspective. + * Doesn't actually give any indication if the mail has been delivered to the recipient properly) */ function sendPlain($messageID = null) { global $project; @@ -407,7 +414,14 @@ class Email extends ViewableData { } /** - * Send the email. + * Send an email with HTML content. + * + * @see sendPlain() for sending plaintext emails only. + * @uses Mailer->sendHTML() + * + * @param string $messageID Optional message ID so the message can be identified in bounces etc. + * @return bool Success of the sending operation from an MTA perspective. + * Doesn't actually give any indication if the mail has been delivered to the recipient properly) */ public function send( $messageID = null ) { Requirements::clear(); diff --git a/email/Mailer.php b/email/Mailer.php index 2c553d5f8..456fcd1d6 100644 --- a/email/Mailer.php +++ b/email/Mailer.php @@ -14,14 +14,18 @@ */ class Mailer extends Object { /** - * Send a plain-text email + * Send a plain-text email. + * + * @return bool */ function sendPlain($to, $from, $subject, $plainContent, $attachedFiles = false, $customheaders = false) { return plaintextEmail($to, $from, $subject, $plainContent, $attachedFiles, $customheaders); } /** - * Send a multi-part HTML email + * Send a multi-part HTML email. + * + * @return bool */ function sendHTML($to, $from, $subject, $htmlContent, $attachedFiles = false, $customheaders = false, $plainContent = false, $inlineImages = false) { return htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles, $customheaders, $plainContent, $inlineImages); @@ -36,6 +40,8 @@ class Mailer extends Object { * $attachedFiles should be an array of file names * - if you pass the entire $_FILES entry, the user-uploaded filename will be preserved * use $plainContent to override default plain-content generation + * + * @return bool */ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $customheaders = false, $plainContent = false, $inlineImages = false) { if ($customheaders && is_array($customheaders) == false) {