reioto / zend-mailj
Zend Mail for Japanese
1.0.1
2015-03-19 02:37 UTC
Requires
- zendframework/zendframework1: >=1.10.0,<2.0.0
Requires (Dev)
- phpunit/phpunit: ~4.5
This package is not auto-updated.
Last update: 2026-02-28 22:20:23 UTC
README
Zend Mail でISO-2022-JPのメールを送れるようにしたラップクラスです。
Installation
composer
composer.json
{
"require": {
"reioto/zend-mailj":"dev-master"
}
}
#php composer.phar install
Usage
function recipientFilename($transport)
{
return $transport->recipients . '_' . mt_rand() . '.tmp';
}
$tr = new Zend_Mail_Transport_File(array('callback' => 'recipientFilename',
'path' => dirname(__FILE__)
));
$mail = new Zend_MailJ();
$mail->setFrom('from@example.com', '差出人名');
$mail->addTo('to@example.com', '宛名');
$mail->setSubject('件名です。件名です。件名です。件名です。');
$mail->setBodyText('メール本文');
$mail->send($tr);