PHP Class Pagekit\Mail\Message

Inheritance: extends Swift_Messag\Swift_Message, implements Pagekit\Mail\MessageInterface
Show file Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Property Type Description
$mailer Pagekit\Mail\MailerInterface

Public Methods

Method Description
attachData ( string $data, string $name, string $mime = null ) : self Attaches in-memory data as an attachment.
attachFile ( string $file, string $name = null, string $mime = null ) : self Attaches a file to the message.
embedData ( string $data, string $name, string $contentType = null ) : string Embeds in-memory data in the message and get the CID.
embedFile ( string $file, string $cid = null ) : string Embeds a file in the message and get the CID.
getMailer ( )
queue ( &$errors = null )
send ( &$errors = null )
setMailer ( Pagekit\Mail\MailerInterface $mailer )

Protected Methods

Method Description
prepareAttachment ( Swift_Mime_Attachment $attachment, string $name = null, string $mime = null ) : self Prepare and attach the given attachment.

Method Details

attachData() public method

Attaches in-memory data as an attachment.
public attachData ( string $data, string $name, string $mime = null ) : self
$data string
$name string
$mime string
return self

attachFile() public method

Attaches a file to the message.
public attachFile ( string $file, string $name = null, string $mime = null ) : self
$file string
$name string
$mime string
return self

embedData() public method

Embeds in-memory data in the message and get the CID.
public embedData ( string $data, string $name, string $contentType = null ) : string
$data string
$name string
$contentType string
return string

embedFile() public method

Embeds a file in the message and get the CID.
public embedFile ( string $file, string $cid = null ) : string
$file string
$cid string
return string

getMailer() public method

public getMailer ( )

prepareAttachment() protected method

Prepare and attach the given attachment.
protected prepareAttachment ( Swift_Mime_Attachment $attachment, string $name = null, string $mime = null ) : self
$attachment Swift_Mime_Attachment
$name string
$mime string
return self

queue() public method

public queue ( &$errors = null )

send() public method

public send ( &$errors = null )

setMailer() public method

public setMailer ( Pagekit\Mail\MailerInterface $mailer )
$mailer Pagekit\Mail\MailerInterface

Property Details

$mailer protected property

protected MailerInterface,Pagekit\Mail $mailer
return Pagekit\Mail\MailerInterface