TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
MailMessage Class Reference
Inheritance diagram for MailMessage:
Swift_Message Swift_Mime_SimpleMessage Swift_Mime_MimePart Swift_Mime_Message Swift_Mime_SimpleMimeEntity Swift_Mime_MimeEntity Swift_Mime_MimeEntity Swift_Mime_CharsetObserver Swift_Mime_EncodingObserver Swift_Mime_CharsetObserver Swift_Mime_EncodingObserver

Public Member Functions

 send ()
 
 isSent ()
 
 getFailedRecipients ()
 
 setReturnPath ($address)
 
 setSender ($address, $name=null)
 
 setFrom ($addresses, $name=null)
 
 setReplyTo ($addresses, $name=null)
 
 setTo ($addresses, $name=null)
 
 setCc ($addresses, $name=null)
 
 setBcc ($addresses, $name=null)
 
 setReadReceiptTo ($addresses)
 
- Public Member Functions inherited from Swift_Message
 __construct ($subject=null, $body=null, $contentType=null, $charset=null)
 
 addPart ($body, $contentType=null, $charset=null)
 
 attachSigner (Swift_Signer $signer)
 
 detachSigner (Swift_Signer $signer)
 
 toString ()
 
 toByteStream (Swift_InputByteStream $is)
 
 __wakeup ()
 
 __clone ()
 
- Public Member Functions inherited from Swift_Mime_SimpleMessage
 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $charset=null)
 
 getNestingLevel ()
 
 setSubject ($subject)
 
 getSubject ()
 
 setDate ($date)
 
 getDate ()
 
 setReturnPath ($address)
 
 getReturnPath ()
 
 setSender ($address, $name=null)
 
 getSender ()
 
 addFrom ($address, $name=null)
 
 setFrom ($addresses, $name=null)
 
 getFrom ()
 
 addReplyTo ($address, $name=null)
 
 setReplyTo ($addresses, $name=null)
 
 getReplyTo ()
 
 addTo ($address, $name=null)
 
 setTo ($addresses, $name=null)
 
 getTo ()
 
 addCc ($address, $name=null)
 
 setCc ($addresses, $name=null)
 
 getCc ()
 
 addBcc ($address, $name=null)
 
 setBcc ($addresses, $name=null)
 
 getBcc ()
 
 setPriority ($priority)
 
 getPriority ()
 
 setReadReceiptTo ($addresses)
 
 getReadReceiptTo ()
 
 attach (Swift_Mime_MimeEntity $entity)
 
 detach (Swift_Mime_MimeEntity $entity)
 
 embed (Swift_Mime_MimeEntity $entity)
 
 toString ()
 
 __toString ()
 
 toByteStream (Swift_InputByteStream $is)
 
- Public Member Functions inherited from Swift_Mime_MimePart
 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $charset=null)
 
 setBody ($body, $contentType=null, $charset=null)
 
 getCharset ()
 
 setCharset ($charset)
 
 getFormat ()
 
 setFormat ($format)
 
 getDelSp ()
 
 setDelSp ($delsp=true)
 
 getNestingLevel ()
 
 charsetChanged ($charset)
 
- Public Member Functions inherited from Swift_Mime_SimpleMimeEntity
 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar)
 
 generateId ()
 
 getHeaders ()
 
 getNestingLevel ()
 
 getContentType ()
 
 setContentType ($type)
 
 getId ()
 
 setId ($id)
 
 getDescription ()
 
 setDescription ($description)
 
 getMaxLineLength ()
 
 setMaxLineLength ($length)
 
 getChildren ()
 
 setChildren (array $children, $compoundLevel=null)
 
 getBody ()
 
 setBody ($body, $contentType=null)
 
 getEncoder ()
 
 setEncoder (Swift_Mime_ContentEncoder $encoder)
 
 getBoundary ()
 
 setBoundary ($boundary)
 
 charsetChanged ($charset)
 
 encoderChanged (Swift_Mime_ContentEncoder $encoder)
 
 toString ()
 
 __toString ()
 
 toByteStream (Swift_InputByteStream $is)
 
 __destruct ()
 
 __clone ()
 
- Public Member Functions inherited from Swift_Mime_MimeEntity
 setChildren (array $children)
 
- Public Member Functions inherited from Swift_Mime_Message
 generateId ()
 

Protected Member Functions

 idnaEncodeAddresses ($addresses)
 
 idnaEncodeAddress ($email)
 
- Protected Member Functions inherited from Swift_Message
 doSign ()
 
 saveMessage ()
 
 saveHeaders (array $altered)
 
 restoreHeaders ()
 
 restoreMessage ()
 
- Protected Member Functions inherited from Swift_Mime_SimpleMessage
 _getIdField ()
 
 _becomeMimePart ()
 
- Protected Member Functions inherited from Swift_Mime_MimePart
 _fixHeaders ()
 
 _setNestingLevel ($level)
 
 _convertString ($string)
 
- Protected Member Functions inherited from Swift_Mime_SimpleMimeEntity
 _bodyToString ()
 
 _bodyToByteStream (Swift_InputByteStream $is)
 
 _getIdField ()
 
 _getHeaderFieldModel ($field)
 
 _setHeaderFieldModel ($field, $model)
 
 _getHeaderParameter ($field, $parameter)
 
 _setHeaderParameter ($field, $parameter, $value)
 
 _fixHeaders ()
 
 _getCache ()
 
 _getGrammar ()
 
 _clearCache ()
 
 getRandomId ()
 

Protected Attributes

 $mailer
 
 $mailerHeader = 'TYPO3'
 
 $sent = false
 
 $failedRecipients = array()
 

Private Member Functions

 initializeMailer ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Swift_Message
static newInstance ($subject=null, $body=null, $contentType=null, $charset=null)
 
- Public Attributes inherited from Swift_Mime_MimeEntity
const LEVEL_TOP = 16
 
const LEVEL_MIXED = 256
 
const LEVEL_ALTERNATIVE = 4096
 
const LEVEL_RELATED = 65536
 

Detailed Description

Adapter for Swift_Mailer to be used by TYPO3 extensions

Definition at line 20 of file MailMessage.php.

Member Function Documentation

getFailedRecipients ( )

Returns the recipients for which the mail was not accepted for delivery.

Returns
array the recipients who were not accepted for delivery

Definition at line 82 of file MailMessage.php.

References MailMessage\$failedRecipients.

idnaEncodeAddress (   $email)
protected

IDNA encode the domain part of an email address if it contains non ASCII characters

Parameters
mixed$email
Returns
mixed
See Also
::validEmail

Definition at line 243 of file MailMessage.php.

Referenced by MailMessage\idnaEncodeAddresses().

idnaEncodeAddresses (   $addresses)
protected

IDNA encode email addresses. Accepts addresses in all formats that SwiftMailer supports

Parameters
string | array$addresses
Returns
string|array

Definition at line 219 of file MailMessage.php.

References MailMessage\idnaEncodeAddress().

Referenced by MailMessage\setBcc(), MailMessage\setCc(), MailMessage\setFrom(), MailMessage\setReadReceiptTo(), MailMessage\setReplyTo(), MailMessage\setReturnPath(), MailMessage\setSender(), and MailMessage\setTo().

initializeMailer ( )
private
Returns
void

Definition at line 49 of file MailMessage.php.

Referenced by MailMessage\send().

isSent ( )

Checks whether the message has been sent.

Returns
bool

Definition at line 72 of file MailMessage.php.

References MailMessage\$sent.

send ( )

Sends the message.

Returns
int the number of recipients who were accepted for delivery

Definition at line 59 of file MailMessage.php.

References Swift_Mime_MimeEntity\getHeaders(), and MailMessage\initializeMailer().

setBcc (   $addresses,
  $name = null 
)

Set the Bcc addresses of this message.

If $name is passed and the first parameter is a string, this name will be associated with the address.

Parameters
string | array$addresses
string$nameoptional
Returns

Implements Swift_Mime_Message.

Definition at line 195 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

setCc (   $addresses,
  $name = null 
)

Set the Cc addresses of this message.

If $name is passed and the first parameter is a string, this name will be associated with the address.

Parameters
string | array$addresses
string$nameoptional
Returns

Implements Swift_Mime_Message.

Definition at line 179 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

setFrom (   $addresses,
  $name = null 
)

Set the from address of this message.

You may pass an array of addresses if this message is from multiple people.

If $name is passed and the first parameter is a string, this name will be associated with the address.

Parameters
string | array$addresses
string$nameoptional
Returns

Implements Swift_Mime_Message.

Definition at line 126 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

setReadReceiptTo (   $addresses)

Ask for a delivery receipt from the recipient to be sent to $addresses.

Parameters
array$addresses
Returns

Definition at line 207 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

setReplyTo (   $addresses,
  $name = null 
)

Set the reply-to address of this message.

You may pass an array of addresses if replies will go to multiple people.

If $name is passed and the first parameter is a string, this name will be associated with the address.

Parameters
string | array$addresses
string$nameoptional
Returns

Implements Swift_Mime_Message.

Definition at line 144 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

setReturnPath (   $address)

Set the return-path (the bounce address) of this message.

Parameters
string$address
Returns

Implements Swift_Mime_Message.

Definition at line 93 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

setSender (   $address,
  $name = null 
)

Set the sender of this message.

This does not override the From field, but it has a higher significance.

Parameters
string$address
string$nameoptional
Returns

Implements Swift_Mime_Message.

Definition at line 108 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

setTo (   $addresses,
  $name = null 
)

Set the to addresses of this message.

If multiple recipients will receive the message an array should be used. Example: array('recei.nosp@m.ver@.nosp@m.domai.nosp@m.n.or.nosp@m.g', 'other.nosp@m.@dom.nosp@m.ain.o.nosp@m.rg' => 'A name')

If $name is passed and the first parameter is a string, this name will be associated with the address.

Parameters
string | array$addresses
string$nameoptional
Returns

Implements Swift_Mime_Message.

Definition at line 163 of file MailMessage.php.

References MailMessage\idnaEncodeAddresses().

Member Data Documentation

$failedRecipients = array()
protected

Definition at line 44 of file MailMessage.php.

Referenced by MailMessage\getFailedRecipients().

$mailer
protected

Definition at line 25 of file MailMessage.php.

$mailerHeader = 'TYPO3'
protected

Definition at line 30 of file MailMessage.php.

$sent = false
protected

Definition at line 37 of file MailMessage.php.

Referenced by MailMessage\isSent().