1

我正在尝试从本地主机发送电子邮件,但收到此消息。

 03/14/15 10:28:31,121 [4924] ERROR filter.ExceptionCatcherFilter - Uncaught Exception: exception 'Swift_TransportException' with message 'Connection could not be established with host localhost [No connection could be made because the target machine actively refused it.
#10061]' in C:\wamp\www\erp9282014\symfony\lib\vendor\symfony\lib\vendor\swiftmailer\classes\Swift\Transport\StreamBuffer.php:235

我在 factory.yml 中的配置是

prod:
  mailer:
    class: sfMailer
    param:
      logging:           %SF_LOGGING_ENABLED%
      charset:           %SF_CHARSET%
      delivery_strategy: realtime
    transport:
      class: Swift_SmtpTransport
      param:
        host:       localhost
        port:       25
        encryption: ~
        username:   myname@gmail.com
        password:   my password

在我使用的动作文件中。

 $this->getMailer();
    $this->getMailer()->composeAndSend("erp@ahg.af","m@ahg.af"," LIVE","BODY");

我真的被困在这里

4

1 回答 1

0

最后,我想出了这个问题。问题出在我的在线服务器上。当我更换服务器时,一切正常。

于 2015-11-06T05:33:21.330 回答