Message¶
-
class
OC\Mail\
Message
¶ - Class Message provides a wrapper around SwiftMail
Source: lib/private/Mail/Message.php#45 Implements: OCP\Mail\IMessage
Properties¶
Methods¶
-
public
OC\Mail\Message::
__construct
($swiftMessage, $plainTextOnly)¶ Source: lib/private/Mail/Message.php#51
-
public
OC\Mail\Message::
attach
($attachment)¶ Source: Parameters: - $attachment (
OCP\Mail\IAttachment
)
Returns: $this
Since: 13.0.0
- $attachment (
-
protected
OC\Mail\Message::
convertAddresses
($addresses)¶ - SwiftMailer does currently not work with IDN domains, this function therefore converts the domainsFIXME: Remove this once SwiftMailer supports IDN
Source: Parameters: - $addresses (array) Array of mail addresses, key will get converted
Returns: array Converted addresses if `idn_to_ascii` exists
-
public
OC\Mail\Message::
setFrom
($addresses)¶ - Set the from address of this message.If no “From” address is used \OC\Mail\Mailer will use mail_from_address and mail_domain from config.php
Source: Parameters: - $addresses (array) Example: array('sender@domain.org‘, 'other@domain.org‘ => ‘A name’)
Returns: $this
-
public
OC\Mail\Message::
getFrom
()¶ - Get the from address of this message.
Source: lib/private/Mail/Message.php#116 Returns: array
-
public
OC\Mail\Message::
setReplyTo
($addresses)¶ - Set the Reply-To address of this message
Source: Parameters: - $addresses (array)
Returns: $this
-
public
OC\Mail\Message::
getReplyTo
()¶ - Returns the Reply-To address of this message
Source: lib/private/Mail/Message.php#138 Returns: string
-
public
OC\Mail\Message::
setTo
($recipients)¶ - Set the to addresses of this message.
Source: Parameters: - $recipients (array) Example: array('recipient@domain.org‘, 'other@domain.org‘ => ‘A name’)
Returns: $this
-
public
OC\Mail\Message::
getTo
()¶ - Get the to address of this message.
Source: lib/private/Mail/Message.php#160 Returns: array
-
public
OC\Mail\Message::
setCc
($recipients)¶ - Set the CC recipients of this message.
Source: Parameters: - $recipients (array) Example: array('recipient@domain.org‘, 'other@domain.org‘ => ‘A name’)
Returns: $this
-
public
OC\Mail\Message::
getCc
()¶ - Get the cc address of this message.
Source: lib/private/Mail/Message.php#182 Returns: array
-
public
OC\Mail\Message::
setBcc
($recipients)¶ - Set the BCC recipients of this message.
Source: Parameters: - $recipients (array) Example: array('recipient@domain.org‘, 'other@domain.org‘ => ‘A name’)
Returns: $this
-
public
OC\Mail\Message::
getBcc
()¶ - Get the Bcc address of this message.
Source: lib/private/Mail/Message.php#204 Returns: array
-
public
OC\Mail\Message::
setSubject
($subject)¶ - Set the subject of this message.
Source: Parameters: - $subject (string)
Returns:
-
public
OC\Mail\Message::
getSubject
()¶ - Get the from subject of this message.
Source: lib/private/Mail/Message.php#224 Returns: string
-
public
OC\Mail\Message::
setPlainBody
($body)¶ - Set the plain-text body of this message.
Source: Parameters: - $body (string)
Returns: $this
-
public
OC\Mail\Message::
getPlainBody
()¶ - Get the plain body of this message.
Source: lib/private/Mail/Message.php#244 Returns: string
-
public
OC\Mail\Message::
setHtmlBody
($body)¶ - Set the HTML body of this message. Consider also sending a plain-text body instead of only an HTML one.
Source: Parameters: - $body (string)
Returns: $this
-
public
OC\Mail\Message::
setSwiftMessage
($swiftMessage)¶ - Get’s the underlying SwiftMessage
Source: Parameters: - $swiftMessage (
Swift_Message
)
- $swiftMessage (
-
public
OC\Mail\Message::
getSwiftMessage
()¶ - Get’s the underlying SwiftMessage
Source: lib/private/Mail/Message.php#273 Returns: \Swift_Message
-
public
OC\Mail\Message::
setBody
($body, $contentType)¶ Source: Parameters: - $body (string)
- $contentType (string)
Returns: $this
-
public
OC\Mail\Message::
useTemplate
($emailTemplate)¶ Source: Parameters: - $emailTemplate (
OCP\Mail\IEMailTemplate
)
Returns: $this
- $emailTemplate (