MailAttachment

Represent a mail attachment that can be used in a MailMessage.

package

Default

Methods

__construct

__construct() 

Add an header to this attachment.

addHeader( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

string

Response

$this

a reference to this, so the API can be used fluently

construct an empty MailAttachment object that can be filled with the setters

create( $arg0 = null) : \io\vertx\jphp\ext\mail\MailAttachment
static

create()

create a MailAttachment object from a JsonObject representation

param $json [array] object to be copied create($json)

create a copy of a MailAttachment object

param $other [MailAttachment] object to be copied create($other)

Arguments

$arg0

array | MailAttachment

Response

\io\vertx\jphp\ext\mail\MailAttachment

get the Content-ID field

getContentId() : string

Response

string

the content id

get the Content-Type

getContentType() : string

Response

string

the contentType

get the data

getData() : \io\vertx\jphp\core\buffer\Buffer

get the description field

getDescription() : string

Response

string

the description

get the disposition field

getDisposition() : string

Response

string

the disposition

Get the headers to be added for this attachment.

getHeaders() : \io\vertx\jphp\core\MultiMap

Response

\io\vertx\jphp\core\MultiMap

the headers

get the name

getName() : string

Response

string

the name

set the Content-ID field to be used in the attachment

setContentId( $arg0) : $this

Arguments

$arg0

string

Response

$this

this to be able to use it fluently

set the Content-Type

setContentType( $arg0) : $this

Arguments

$arg0

string

Response

$this

this to be able to use it fluently

set the data

setData( $arg0) : $this

Arguments

$arg0

Buffer

Response

$this

this to be able to use it fluently

set the description field to be used in the attachment

setDescription( $arg0) : $this

Arguments

$arg0

string

Response

$this

this to be able to use it fluently

set the disposition field to be used in the attachment

setDisposition( $arg0) : $this

Arguments

$arg0

string

Response

$this

this to be able to use it fluently

Set the headers to be added for this attachment.

setHeaders( $arg0) : $this

Arguments

$arg0

MultiMap

Response

$this

this to be able to use it fluently

set the name

setName( $arg0) : $this

Arguments

$arg0

string

Response

$this

this to be able to use it fluently

name is the descriptive filename that will be put into the mail i.e. usually a local filename without path this can be set to "" to omit the filename attribute

convert this object to JSON representation

toJson() : array

Response

array

the JSON object