EmailAttachment

Implements \EmailAttachmentInterface

Class EmailAttachment

Email attachment will serve as the path to the file that needs to be attached (located on the server).

category

System

package

Email

subpackage

Entities

Methods

Constructor

__construct(\AttachmentPathInterface $path = null, \AttachmentNameInterface $name = null) 

Entity representing an email attachment.

Arguments

$path

\AttachmentPathInterface

(optional) Attachment path.

$name

\AttachmentNameInterface

(optional) Attachment name.

Returns the name of an email attachment.

getName() : \AttachmentNameInterface

Response

\AttachmentNameInterface

Attachment name.

Returns the path of an email attachment.

getPath(boolean $absolutePath = true) : \AttachmentPathInterface

Arguments

$absolutePath

boolean

(optional) Whether to return the absolute path or the relative one.

Response

\AttachmentPathInterface

Attachment path.

Sets the name of an email attachment.

setName(\AttachmentNameInterface $name) 

Arguments

$name

\AttachmentNameInterface

Attachment name.

Sets the path of an email attachment.

setPath(\AttachmentPathInterface $path) 

Arguments

$path

\AttachmentPathInterface

Attachment path.

Properties