Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function sendAccountActivationLink(Array $data, Swift_Mailer $mailer)
- {
- $message = (new Swift_Message('Hello Email'))
- ->setFrom('myemail@gmail.com')
- ->setTo($data['email'])
- ->setBody(
- $this->renderView(
- 'mails/registration.html.twig',
- ['data' => $data]
- ),
- 'text/html'
- )
- ;
- $mailer->send($message);
- }
- $this->get('mailer')->send($message);
- swiftmailer:
- url: '%env(MAILER_URL)%'
- spool: { type: 'memory' }
- transport: smtp
- username: myemail@gmail.com
- password: password
- host: localhost
- port: false
- MAILER_URL=gmail://myemail@gmail.com:password@localhost
Add Comment
Please, Sign In to add comment