【发布时间】:2012-10-09 05:25:58
【问题描述】:
我正在使用 symfony 1.4 和 propel 1.4
我在 factory.yml 中进行了以下设置
dev:
mailer:
class: sfMailer
param:
logging: %SF_LOGGING_ENABLED%
charset: %SF_CHARSET%
delivery_strategy: realtime
transport:
class: Swift_SmtpTransport
params:
host: mail.myserver.com
port: 26
username: webmaster@myserver.com
password: mypass
运行以下代码:
$mailer=$this->getMailer()->composeAndSend($from, $to, $subject, $message);
错误后的问题
Connection could not be established with host localhost [A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. #10060]
我的问题是,它正在尝试连接到 localhost,即使我在 factory.yml 中提供了不同的主机。谁能告诉我问题出在哪里?
【问题讨论】:
标签: email symfony-1.4 swiftmailer