本文整理匯總了PHP中Eccube\Application::mail方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::mail方法的具體用法?PHP Application::mail怎麽用?PHP Application::mail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Eccube\Application
的用法示例。
在下文中一共展示了Application::mail方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sendPasswordResetCompleteMail
/**
* Send password reset notification mail.
*
* @param $Customer 會員情報
*/
public function sendPasswordResetCompleteMail(\Eccube\Entity\Customer $Customer, $password)
{
$body = $this->app->renderView('Mail/reset_complete_mail.twig', array('Customer' => $Customer, 'password' => $password));
$message = \Swift_Message::newInstance()->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ')->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))->setTo(array($Customer->getEmail()))->setBcc($this->BaseInfo->getEmail01())->setReplyTo($this->BaseInfo->getEmail03())->setReturnPath($this->BaseInfo->getEmail04())->setBody($body);
$event = new EventArgs(array('message' => $message, 'Customer' => $Customer, 'BaseInfo' => $this->BaseInfo, 'password' => $password), null);
$this->app['eccube.event.dispatcher']->dispatch(EccubeEvents::MAIL_PASSWORD_RESET_COMPLETE, $event);
$this->app->mail($message);
}
示例2: sendMail
/**
* メールを送信する
* @param array $formData メルマガ情報
* email: 送信先メールアドレス
* subject: 件名
* body:本文
*/
protected function sendMail($formData)
{
// メール送信
$message = \Swift_Message::newInstance()->setSubject($formData['subject'])->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))->setTo(array($formData['email']))->setReplyTo($this->BaseInfo->getEmail03())->setReturnPath($this->BaseInfo->getEmail04())->setBody($formData['body']);
return $this->app->mail($message);
}
示例3: sendPasswordResetCompleteMail
/**
* Send password reset notification mail.
*
* @param $Customer 會員情報
*/
public function sendPasswordResetCompleteMail(\Eccube\Entity\Customer $Customer, $password)
{
$body = $this->app->renderView('Mail/reset_complete_mail.twig', array('Customer' => $Customer, 'password' => $password));
$message = \Swift_Message::newInstance()->setSubject('[' . $this->BaseInfo->getShopName() . '] パスワード変更のお知らせ')->setFrom(array($this->BaseInfo->getEmail01() => $this->BaseInfo->getShopName()))->setTo(array($Customer->getEmail()))->setBcc($this->BaseInfo->getEmail01())->setReplyTo($this->BaseInfo->getEmail03())->setReturnPath($this->BaseInfo->getEmail04())->setBody($body);
$this->app->mail($message);
}