AppMailer
extends Mailer
in package
FinalYes
アプリケーション側で使用するメール送信機能。
Table of Contents
Constants
- DEFAULT_CHARACTER_SET = 'utf-8'
- DEFAULT_ENCODING = '8bit'
- ADDRESS_KIND_BCC = 4
- ADDRESS_KIND_CC = 3
- ADDRESS_KIND_FROM = 1
- ADDRESS_KIND_TO = 2
Properties
- $attachments : array<string|int, Attachment>
- 添付ファイル。
- $bccAddresses : array<string|int, EmailAddress>
- BCC:
- $ccAddresses : array<string|int, EmailAddress>
- CC:
- $characterSet : string
- $customSubjectHeader : string
- 件名のヘッダ部分。
- $encoding : string
- $fromAddress : EmailAddress
- FROM:
- $returnPath : string
- Return-Path:
- $subject : string
- 件名。
- $toAddresses : array<string|int, EmailAddress>
- TO:
- $message : EmailMessage
- メッセージ。
- $overwriteTarget : string
- $setting : IMailSetting
Methods
- __construct() : mixed
- 生成。
- send() : void
- 送信。
- setMessage() : void
- 本文設定。
- buildSubject() : string
- 件名を調整。
- convertAddress() : EmailAddress
- アドレスを設定可能形式に変換。
Constants
DEFAULT_CHARACTER_SET
public
mixed
DEFAULT_CHARACTER_SET
= 'utf-8'
DEFAULT_ENCODING
public
mixed
DEFAULT_ENCODING
= '8bit'
ADDRESS_KIND_BCC
protected
mixed
ADDRESS_KIND_BCC
= 4
ADDRESS_KIND_CC
protected
mixed
ADDRESS_KIND_CC
= 3
ADDRESS_KIND_FROM
protected
mixed
ADDRESS_KIND_FROM
= 1
ADDRESS_KIND_TO
protected
mixed
ADDRESS_KIND_TO
= 2
Properties
$attachments
添付ファイル。
public
array<string|int, Attachment>
$attachments
= []
$bccAddresses
BCC:
public
array<string|int, EmailAddress>
$bccAddresses
= []
$ccAddresses
CC:
public
array<string|int, EmailAddress>
$ccAddresses
= []
$characterSet
public
string
$characterSet
= self::DEFAULT_CHARACTER_SET
$customSubjectHeader
件名のヘッダ部分。
public
string
$customSubjectHeader
= ''
特に指定しない場合は標準のものが使用される。
$encoding
public
string
$encoding
= self::DEFAULT_ENCODING
$fromAddress
FROM:
public
EmailAddress
$fromAddress
$returnPath
Return-Path:
public
string
$returnPath
= \PeServer\Core\Text::EMPTY
$subject
件名。
public
string
$subject
= \PeServer\Core\Text::EMPTY
$toAddresses
TO:
public
array<string|int, EmailAddress>
$toAddresses
= []
$message
メッセージ。
private
EmailMessage
$message
$overwriteTarget
private
string
$overwriteTarget
= \PeServer\Core\Text::EMPTY
$setting read-only
private
IMailSetting
$setting
Methods
__construct()
生成。
public
__construct(AppConfiguration $config, Environment $environment) : mixed
Parameters
- $config : AppConfiguration
- $environment : Environment
send()
送信。
public
send() : void
setMessage()
本文設定。
public
setMessage(EmailMessage $message) : void
Parameters
- $message : EmailMessage
Tags
buildSubject()
件名を調整。
protected
buildSubject(string $subject) : string
Parameters
- $subject : string
-
元になる件名。
Return values
stringconvertAddress()
アドレスを設定可能形式に変換。
protected
convertAddress(int $kind, EmailAddress $data) : EmailAddress
サービス側でトラップせずにこいつを拡張して開発中は知らんところに飛ばないように調整する。
Parameters
- $kind : int
-
種別
- $data : EmailAddress