mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
ac06b8dd20
commit
331ea15e45
@ -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();
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user