コード例 #1
0
 /**
  * @inheritdoc
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $renderer = $serviceLocator->get('deit_mail_renderer');
     $transport = $serviceLocator->get('deit_mail_transport');
     $service = new Service();
     $service->setRenderer($renderer)->setTransport($transport);
     return $service;
 }
コード例 #2
0
 /**
  * Tests the send
  */
 public function testSendMessageWithAttachments()
 {
     $this->service->send(['to' => '*****@*****.**', 'from' => '*****@*****.**', 'subject' => 'Test email', 'attachments' => [['type' => 'text/html', 'name' => 'test.html', 'content' => '<html><head><title>Test HTML Page</title></head><body><h1>Test HTML Page</h1></body></html>']]]);
 }