Message
in package
implements
IMessage
Mail Message Object
This object is used to define a mail message that can be used to transfer data to a provider
Tags
Table of Contents
Interfaces
- IMessage
- Mail Message Interface
Properties
- $data : array<string|int, mixed>
Methods
- __construct() : mixed
- initialize the mail message object
- getAttachments() : array<int, IAttachment>
- gets the attachments of this message
- getBcc() : array<int, IAddress>
- gets the blind copy to recipient(s) of this message
- getBody() : string|null
- gets either the html or plain text body of this message
- getBodyHtml() : string|null
- gets the html body of this message
- getBodyPlain() : string|null
- gets the plain text body of this message
- getCc() : array<int, IAddress>
- gets the copy to recipient(s) of this message
- getFrom() : IAddress|null
- gets the sender of this message
- getReplyTo() : IAddress|null
- gets the sender's reply to address of this message
- getSubject() : string|null
- gets the subject of this message
- getTo() : array<int, IAddress>
- gets the recipient(s) of this message
- id() : string
- arbitrary unique text string identifying this message
- setAttachments() : self
- sets the attachments of this message
- setBcc() : self
- sets the blind copy to recipient(s) of this message
- setBody() : self
- sets the plain text or html body of this message
- setBodyHtml() : self
- sets the html body of this message
- setBodyPlain() : self
- sets the plain text body of this message
- setCc() : self
- sets the copy to recipient(s) of this message
- setFrom() : self
- sets the sender of this message
- setReplyTo() : self
- sets the sender's reply to address of this message
- setSubject() : self
- sets the subject of this message
- setTo() : self
- sets the recipient(s) of this message
Properties
$data
protected
array<string|int, mixed>
$data
= []
Methods
__construct()
initialize the mail message object
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
message data array
Tags
getAttachments()
gets the attachments of this message
public
getAttachments() : array<int, IAttachment>
Tags
Return values
array<int, IAttachment> —collection of all mail attachment objects
getBcc()
gets the blind copy to recipient(s) of this message
public
getBcc() : array<int, IAddress>
Tags
Return values
array<int, IAddress> —collection of all blind copied recipient mail address objects
getBody()
gets either the html or plain text body of this message
public
getBody() : string|null
html body will be returned over plain text if html body exists
Tags
Return values
string|null —html/plain body of this message or null if one is not set
getBodyHtml()
gets the html body of this message
public
getBodyHtml() : string|null
Tags
Return values
string|null —html body of this message or null if one is not set
getBodyPlain()
gets the plain text body of this message
public
getBodyPlain() : string|null
Tags
Return values
string|null —plain text body of this message or null if one is not set
getCc()
gets the copy to recipient(s) of this message
public
getCc() : array<int, IAddress>
Tags
Return values
array<int, IAddress> —collection of all copied recipient mail address objects
getFrom()
gets the sender of this message
public
getFrom() : IAddress|null
Tags
Return values
IAddress|null —sender's mail address object
getReplyTo()
gets the sender's reply to address of this message
public
getReplyTo() : IAddress|null
Tags
Return values
IAddress|null —sender's reply to mail address object
getSubject()
gets the subject of this message
public
getSubject() : string|null
Tags
Return values
string|null —subject of message or null if one is not set
getTo()
gets the recipient(s) of this message
public
getTo() : array<int, IAddress>
Tags
Return values
array<int, IAddress> —collection of all recipient mail address objects
id()
arbitrary unique text string identifying this message
public
id() : string
Tags
Return values
string —id of this message
setAttachments()
sets the attachments of this message
public
setAttachments(IAttachment ...$value) : self
Parameters
- $value : IAttachment
-
collection of or one or more mail attachment objects
Tags
Return values
self —return this object for command chaining
setBcc()
sets the blind copy to recipient(s) of this message
public
setBcc(IAddress ...$value) : self
Parameters
- $value : IAddress
-
collection of or one or more mail address objects
Tags
Return values
self —return this object for command chaining
setBody()
sets the plain text or html body of this message
public
setBody(string $value[, bool $html = false ]) : self
Parameters
- $value : string
-
text or html body of message
- $html : bool = false
-
html flag - true for html
Tags
Return values
self —return this object for command chaining
setBodyHtml()
sets the html body of this message
public
setBodyHtml(string $value) : self
Parameters
- $value : string
-
html body of message
Tags
Return values
self —return this object for command chaining
setBodyPlain()
sets the plain text body of this message
public
setBodyPlain(string $value) : self
Parameters
- $value : string
-
plain text body of message
Tags
Return values
self —return this object for command chaining
setCc()
sets the copy to recipient(s) of this message
public
setCc(IAddress ...$value) : self
Parameters
- $value : IAddress
-
collection of or one or more mail address objects
Tags
Return values
self —return this object for command chaining
setFrom()
sets the sender of this message
public
setFrom(IAddress $value) : self
Parameters
- $value : IAddress
-
sender's mail address object
Tags
Return values
self —return this object for command chaining
setReplyTo()
sets the sender's reply to address of this message
public
setReplyTo(IAddress $value) : self
Parameters
- $value : IAddress
-
senders's reply to mail address object
Tags
Return values
self —return this object for command chaining
setSubject()
sets the subject of this message
public
setSubject(string $value) : self
Parameters
- $value : string
-
subject of mail message
Tags
Return values
self —return this object for command chaining
setTo()
sets the recipient(s) of this message
public
setTo(IAddress ...$value) : self
Parameters
- $value : IAddress
-
collection of or one or more mail address objects
Tags
Return values
self —return this object for command chaining