无法使用[#0]

时间:2017-02-28 13:06:24

标签: php symfony swiftmailer

我正在使用symfony 2框架,尝试使用swiftmailer发送邮件。 我收到错误:无法与" myhost"建立连接[#0]

我的conf.yml:

   swiftmailer:
      transport:  smtp
      encryption: ssl
      auth_mode:  login
      port:       587
      host:       myHostWebMail eg: mail.company.fr
      username:   xx@company.fr
      password:   mypassword
      delivery_address:   EmailAdress
      disable_delivery:   false

当我将端口更改为26时,我收到此错误:

    Connection could not be established with host mail.company.fr [No 
    connection could be established because the target computer expressly refused.#10061]

问题出在哪里?

1 个答案:

答案 0 :(得分:-1)

实际上缺少一条线:

   spool: {type: memory }