dongyinting3179 2015-03-14 09:39
浏览 85

使用symfony1.4 Swiftmailer从localhost发送电子邮件

I am trying to send email from localhost, but i get this message.

 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

My configuration in factory.yml is

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

and in my action files i use.

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

I am really stuck in here

  • 写回答

1条回答 默认 最新

  • doushao5047 2015-11-06 05:33
    关注

    Finally, I come up with this problem. The problem was with my online server. when i changed my server, and every thing worked find.

    评论

报告相同问题?

悬赏问题

  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)