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