我正在使用带有推进 1.4 的 symfony 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 中提供了不同的主机。谁能告诉我问题出在哪里?