This class provides access to mail Transport and mail Message object. Use the getMessage to create an email message, and then use the send method to send it using the Transport object.
Inheritance: use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\StdLib\ComponentTrait
コード例 #1
0
ファイル: Loader.php プロジェクト: Webiny/Framework
 /**
  * Get the name of bridge library which will be used as the driver.
  *
  * @param string $mailer
  *
  * @return string
  */
 protected static function getLibrary($mailer)
 {
     return Mailer::getConfig()->get('Bridge.' . $mailer, self::$library);
 }
コード例 #2
0
ファイル: MessageTest.php プロジェクト: Webiny/Framework
 public function encoderProvider()
 {
     \Webiny\Component\Mailer\Mailer::setConfig(__DIR__ . '/../../' . self::CONFIG);
     return [[new Message(), '7bit'], [new Message(), '8bit'], [new Message(), 'base64']];
 }
コード例 #3
0
ファイル: LoaderTest.php プロジェクト: Webiny/Framework
 public function setUp()
 {
     Mailer::setConfig(realpath(__DIR__ . '/' . self::CONFIG));
 }
コード例 #4
0
ファイル: MailerTest.php プロジェクト: Webiny/Framework
 public function testConfigContent()
 {
     $this->assertSame('nikola@localhost', Mailer::getConfig()->Default->Sender->Email);
     $this->assertSame('\\Webiny\\Component\\Mailer\\Bridge\\SwiftMailer\\SwiftMailer', Mailer::getConfig()->Bridge->Default);
 }