2017-02-28 131 views
0

我正在使用symfony 2框架,嘗試使用swiftmailer發送郵件。 我發現了錯誤:連接無法與 「myhost的」 建立[#0]無法使用[#0]建立連接

我conf.yml:

swiftmailer: 
     transport: smtp 
     encryption: ssl 
     auth_mode: login 
     port:  587 
     host:  myHostWebMail eg: mail.company.fr 
     username: [email protected] 
     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

它實際上是缺少一個行:

spool: {type: memory }