Guest User

Untitled

a guest
Feb 7th, 2018
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. $transporter = Swift_SmtpTransport::newInstance('myWebMail.com', 465, 'ssl')
  2. ->setUsername('user@test.com')
  3. ->setPassword('secret');
  4. $mailer = Swift_Mailer::newInstance($transporter);
  5.  
  6. Swift_Mailer::__set_state(array(
  7. '_transport' =>
  8. Swift_SmtpTransport::__set_state(array(
  9. '_handlers' =>
  10. array (
  11. 'AUTH' =>
  12. Swift_Transport_Esmtp_AuthHandler::__set_state(array(
  13. '_authenticators' =>
  14. array (
  15. 0 =>
  16. Swift_Transport_Esmtp_Auth_CramMd5Authenticator::__set_state(array(
  17. )),
  18. 1 =>
  19. Swift_Transport_Esmtp_Auth_LoginAuthenticator::__set_state(array(
  20. )),
  21. 2 =>
  22. Swift_Transport_Esmtp_Auth_PlainAuthenticator::__set_state(array(
  23. )),
  24. 3 =>
  25. Swift_Transport_Esmtp_Auth_NTLMAuthenticator::__set_state(array(
  26. )),
  27. 4 =>
  28. Swift_Transport_Esmtp_Auth_XOAuth2Authenticator::__set_state(array(
  29. )),
  30. ),
  31. '_username' => 'user@test.com',
  32. '_password' => 'secret',
  33. '_auth_mode' => NULL,
  34. '_esmtpParams' =>
  35. array (
  36. ),
  37. )),
  38. ...
  39.  
  40. $mailer = $this->container->get('swiftmailer.mailer');
  41.  
  42. Swift_Mailer::__set_state(array(
  43. '_transport' =>
  44. Swift_Transport_EsmtpTransport::__set_state(array(
  45. '_handlers' =>
  46. array (
  47. 'AUTH' =>
  48. Swift_Transport_Esmtp_AuthHandler::__set_state(array(
  49. '_authenticators' =>
  50. array (
  51. 0 =>
  52. Swift_Transport_Esmtp_Auth_CramMd5Authenticator::__set_state(array(
  53. )),
  54. 1 =>
  55. Swift_Transport_Esmtp_Auth_LoginAuthenticator::__set_state(array(
  56. )),
  57. 2 =>
  58. Swift_Transport_Esmtp_Auth_PlainAuthenticator::__set_state(array(
  59. )),
  60. ),
  61. '_username' => 'user@test.com',
  62. '_password' => 'secret',
  63. '_auth_mode' => NULL,
  64. '_esmtpParams' =>
  65. array (
  66. ),
  67. )),
  68. ),
  69.  
  70. mailer_transport: smtp
  71. mailer_host: myWebMail.com
  72. mailer_port: 465
  73. mailer_encryption: ssl
  74. mailer_user: user@test.com
  75. mailer_password: secret
  76.  
  77. swiftmailer:
  78. default_mailer: default_mailer
  79. mailers:
  80. default_mailer:
  81. transport: "%mailer_transport%"
  82. host: "%mailer_host%"
  83. username: "%mailer_user%"
  84. password: "%mailer_password%"
Add Comment
Please, Sign In to add comment