IAttachment
in
Mail Attachment Interface
This interface is used for defining individual attachments that are attached to a message
Tags
Table of Contents
Methods
- getContents() : string|null
- gets the attachment contents (actual data)
- getEmbedded() : bool
- gets the embedded status of the attachment
- getName() : string|null
- gets the attachment file name
- getType() : string|null
- gets the attachment mime type
- setContents() : self
- sets the attachment contents (actual data)
- setEmbedded() : self
- sets the embedded status of the attachment
- setName() : self
- sets the attachment file name
- setType() : self
- sets the attachment mime type
Methods
getContents()
gets the attachment contents (actual data)
public
getContents() : string|null
Tags
Return values
string|null —returns the attachment contents or null if not set
getEmbedded()
gets the embedded status of the attachment
public
getEmbedded() : bool
Tags
Return values
bool —embedded status of the attachment
getName()
gets the attachment file name
public
getName() : string|null
Tags
Return values
string|null —returns the attachment file name or null if one is not set
getType()
gets the attachment mime type
public
getType() : string|null
Tags
Return values
string|null —returns the attachment mime type or null if not set
setContents()
sets the attachment contents (actual data)
public
setContents(string $value) : self
Parameters
- $value : string
-
binary contents of file
Tags
Return values
self —return this object for command chaining
setEmbedded()
sets the embedded status of the attachment
public
setEmbedded(bool $value) : self
Parameters
- $value : bool
-
true - embedded / false - not embedded
Tags
Return values
self —return this object for command chaining
setName()
sets the attachment file name
public
setName(string $value) : self
Parameters
- $value : string
-
file name (e.g example.txt)
Tags
Return values
self —return this object for command chaining
setType()
sets the attachment mime type
public
setType(string $value) : self
Parameters
- $value : string
-
mime type (e.g. text/plain)
Tags
Return values
self —return this object for command chaining