MINOR Documentation for email classes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73225 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-03-17 09:07:33 +00:00
parent ac06b8dd20
commit 331ea15e45
2 changed files with 25 additions and 5 deletions

View File

@ -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();

View File

@ -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) {