PHP Класс Bogardo\Mailgun\Mail\Message

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$messageBuilder Mailgun\Messages\MessageBuilder
$variables array

Открытые методы

Метод Описание
__construct ( MessageBuilder $messageBuilder, Illuminate\Contracts\Config\Repository $config ) Message constructor.
attach ( string $path, string $name = '' ) : Message Attach a file to the message.
bcc ( string | array $address, string $name = "", array $variables = [] ) : Message Add a blind carbon copy to the message.
builder ( ) : MessageBuilder
campaign ( integer | string | array $campaigns ) : Message Add Mailgun campaign ID(s) to the message Campaign ID limit is 3.
cc ( string | array $address, string $name = "", array $variables = [] ) : Message Add a carbon copy to the message.
data ( string $key, mixed $data ) : Message Attach custom data to a message.
dkim ( boolean $enabled ) : Message Enable/disable DKIM signature on per-message basis.
embed ( string $path, string $name = null ) : string Embed a file in the message and get the CID.
from ( string $address, string $name = "" ) Set from address
getFiles ( ) : array Get the files from MessageBuilder
getMessage ( ) : array Get the message from MessageBuilder and apply custom/extra data
header ( string $key, string $value ) : Message Append a custom MIME header to a message.
recipientVariables ( array $variables ) Set/Overwrite recipientVariables
replyTo ( string $address, string $name = "" ) : Message Add a reply-to address to the message.
subject ( string $subject ) : Message Set the subject of the message.
tag ( string | array $tags ) : Message Add Mailgun tags to the message.
testmode ( boolean | string $enabled = true ) : Message Enable or disable test-mode on a per-message basis.
to ( string | array $address, string $name = "", array $variables = [] ) : Message Add a recipient to the message.
trackClicks ( boolean | string $value ) : Message Toggles clicks tracking on a per-message basis.
trackOpens ( boolean $enabled ) : Message Toggles opens-tracking on a per-message basis.

Защищенные методы

Метод Описание
setConfigFrom ( ) Set from address from config
setConfigNativeSend ( ) Force the from address (see description in config).
setConfigReplyTo ( ) Apply reply-to address from config.
setConfigTestMode ( ) Enable/Disable test-mode depending on config setting.

Описание методов

__construct() публичный Метод

Message constructor.
public __construct ( MessageBuilder $messageBuilder, Illuminate\Contracts\Config\Repository $config )
$messageBuilder Mailgun\Messages\MessageBuilder
$config Illuminate\Contracts\Config\Repository

attach() публичный Метод

Attach a file to the message.
public attach ( string $path, string $name = '' ) : Message
$path string
$name string
Результат Message

bcc() публичный Метод

Add a blind carbon copy to the message.
public bcc ( string | array $address, string $name = "", array $variables = [] ) : Message
$address string | array
$name string
$variables array
Результат Message

builder() публичный Метод

public builder ( ) : MessageBuilder
Результат Mailgun\Messages\MessageBuilder

campaign() публичный Метод

Add Mailgun campaign ID(s) to the message Campaign ID limit is 3.
public campaign ( integer | string | array $campaigns ) : Message
$campaigns integer | string | array
Результат Message

cc() публичный Метод

Add a carbon copy to the message.
public cc ( string | array $address, string $name = "", array $variables = [] ) : Message
$address string | array
$name string
$variables array
Результат Message

data() публичный Метод

Attach custom data to a message.
public data ( string $key, mixed $data ) : Message
$key string
$data mixed
Результат Message

dkim() публичный Метод

Enable/disable DKIM signature on per-message basis.
public dkim ( boolean $enabled ) : Message
$enabled boolean
Результат Message

embed() публичный Метод

Embed a file in the message and get the CID.
public embed ( string $path, string $name = null ) : string
$path string
$name string
Результат string

from() публичный Метод

Set from address
public from ( string $address, string $name = "" )
$address string
$name string

getFiles() публичный Метод

Get the files from MessageBuilder
public getFiles ( ) : array
Результат array

getMessage() публичный Метод

Get the message from MessageBuilder and apply custom/extra data
public getMessage ( ) : array
Результат array

header() публичный Метод

Append a custom MIME header to a message.
public header ( string $key, string $value ) : Message
$key string
$value string
Результат Message

recipientVariables() публичный Метод

Set/Overwrite recipientVariables
public recipientVariables ( array $variables )
$variables array

replyTo() публичный Метод

Add a reply-to address to the message.
public replyTo ( string $address, string $name = "" ) : Message
$address string
$name string
Результат Message

setConfigFrom() защищенный Метод

Set from address from config
protected setConfigFrom ( )

setConfigNativeSend() защищенный Метод

Force the from address (see description in config).
protected setConfigNativeSend ( )

setConfigReplyTo() защищенный Метод

Apply reply-to address from config.
protected setConfigReplyTo ( )

setConfigTestMode() защищенный Метод

Enable/Disable test-mode depending on config setting.
protected setConfigTestMode ( )

subject() публичный Метод

Set the subject of the message.
public subject ( string $subject ) : Message
$subject string
Результат Message

tag() публичный Метод

Tag limit is 3.
public tag ( string | array $tags ) : Message
$tags string | array
Результат Message

testmode() публичный Метод

Enable or disable test-mode on a per-message basis.
public testmode ( boolean | string $enabled = true ) : Message
$enabled boolean | string
Результат Message

to() публичный Метод

Add a recipient to the message.
public to ( string | array $address, string $name = "", array $variables = [] ) : Message
$address string | array
$name string
$variables array
Результат Message

trackClicks() публичный Метод

This setting has a higher priority than the domain-level setting. Pass true, false or 'html' or 'htmlonly'.
public trackClicks ( boolean | string $value ) : Message
$value boolean | string
Результат Message

trackOpens() публичный Метод

This setting has a higher priority than the domain-level setting.
public trackOpens ( boolean $enabled ) : Message
$enabled boolean
Результат Message

Описание свойств

$messageBuilder защищенное свойство

protected MessageBuilder,Mailgun\Messages $messageBuilder
Результат Mailgun\Messages\MessageBuilder

$variables защищенное свойство

protected array $variables
Результат array