Properties

$mailer

$mailer : \Swift_Mailer

Type

\Swift_Mailer

$message

$message : \Swift_Message

Type

\Swift_Message

$from

$from : string

Type

string

$replyTo

$replyTo : string

Type

string

$returnPath

$returnPath : string

Type

string

$to

$to : array

Type

array

$cc

$cc : array

Type

array

$bcc

$bcc : array

Type

array

$isIso2022Jp

$isIso2022Jp : boolean

Type

boolean

Methods

__construct()

__construct() 

Mailer Engine constructor.

init()

init() : self

初期化

Returns

self

setMailer()

setMailer(\Swift_Mailer  $mailer) : void

Parameters

\Swift_Mailer $mailer

setEncoderIso2022Jp()

setEncoderIso2022Jp() : self

iso-2022-jpで送信するように設定(デフォルトUTF-8)

Returns

self

getInstance()

getInstance() : self

Returns

self

setSubject()

setSubject(string  $subject) : self

Subjectを設定

Parameters

string $subject

Returns

self

setBody()

setBody(string  $body) : self

本文を設定

Parameters

string $body

Returns

self

charReplace()

charReplace(  $contents,   $to) 

Parameters

$contents
$to

setHtml()

setHtml(string  $html, string  $plain = null) : $this

HTML(本文)を設定

Parameters

string $html
string $plain

Returns

$this

attach()

attach(string  $path, string  $filename = '') : self

添付ファイルの追加

Parameters

string $path
string $filename

Throws

\RuntimeException

Returns

self

setTo()

setTo(array  $to) : self

Toを設定

Parameters

array $to

Returns

self

addTo()

addTo(string  $to) : self

Toを追加

Parameters

string $to

Returns

self

setCc()

setCc(string  $cc) : self

Ccを設定

Parameters

string $cc

Returns

self

addCc()

addCc(string  $cc) : self

Ccを追加

Parameters

string $cc

Returns

self

setBcc()

setBcc(string  $bcc) : self

Bccを設定

Parameters

string $bcc

Returns

self

addBcc()

addBcc(string  $bcc) : self

Bccを追加

Parameters

string $bcc

Returns

self

setFrom()

setFrom(string  $from) : self

Fromを設定

Parameters

string $from

Returns

self

setReplyTo()

setReplyTo(string  $reply_to) : self

ReplyToを設定

Parameters

string $reply_to

Returns

self

send()

send(  $background = 'default') : self

送信

Parameters

$background

Throws

\RuntimeException

Returns

self

getMessage()

getMessage() : string

メールをstringで取得

Returns

string

parseAddress()

parseAddress(string  $txt) : array

アドレス指定を分割

Parameters

string $txt

Returns

array

allowRfcViolation()

allowRfcViolation() : void

RFC違反のメールアドレスの許可