title: Unable to send mail in Symfony 1.31
body: <p>I am trying to send email using the following method in my action class:</p>
  
  <pre><code>  public function executeTestnewmail()
    {
      // send an email to the affiliate
      $message = $this-&gt;getMailer()-&gt;compose(
        array('my_email_address_here' =&gt; 'Jobeet Bot'),
        'recipient_address_here',
        'Jobeet affiliate token',
        &lt;&lt;&lt;EOF
  Your Jobeet affiliate account has been activated.
  
  Your token is 1.
  
  The Jobeet Bot.
  EOF
      );
  
      $this-&gt;getMailer()-&gt;send($message);
  
      $this-&gt;redirect('@homepage');
    }
  </code></pre>
  
  <p>The code above is (almost) verbatim (i.e. almost exact) copy of the Jobeet example - yet when I use correct email addresses for the sender and recipient, no mail is sent, instead, it times out.</p>
  
  <p>I get the following error messages in my log file:</p>
  
  <p>Fatal error: Maximum execution time of 30 seconds exceeded in $(SYMFONY_ROOT_DIR)\lib\log\sfWebDebugLogger.class.php on line 78 Call Stack: 0.0003 66216 1. {main}(</p>
  
  <p>Does this clue suggest anything at all to anyone?
  Has anyone actually managed to send an email using SF1.3+ ?</p>
  
  <p>Incidentally, I can send email from my machine with no problem, by simply using the mail() command (with the same sender/receiver address I am using in my Symfony test), so I know that SMTP etc works correctly on my machine</p>
  
  <p><strong>[Edit]</strong></p>
  
  <p>The full stack trace is included below:</p>
  
  <pre><code>Fatal error: Maximum execution time of 30 seconds exceeded in $(SF_ROOT_DIR)\lib\log\sfWebDebugLogger.class.php on line 78 Call Stack: 0.0003 66216 
  1.  {main}() $(PROJECT_DIR)\web\frontend_dev.php:0 0.2684 10774096
  2.  sfContext-&gt;dispatch() $(PROJECT_DIR)\web\frontend_dev.php:13 0.2684 10774240 
  3.  sfFrontWebController-&gt;dispatch() $(SF_ROOT_DIR)\lib\util\sfContext.class.php:170 0.2691 10795440 
  4.  sfController-&gt;forward() $(SF_ROOT_DIR)\lib\controller\sfFrontWebController.class.php:48 0.3280 11707400 
  5.  sfFilterChain-&gt;execute($(SF_ROOT_DIR)\lib\controller\sfController.class.php:235 0.3286 11715304 
  6.  sfRenderingFilter-&gt;execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3286 11715768 
  7.  sfFilterChain-&gt;execute() $(SF_ROOT_DIR)\lib\filter\sfRenderingFilter.class.php:33 0.3292 11725920 
  8.  sfGuardRememberMeFilter-&gt;execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3292 11727680 
  9.  sfFilterChain-&gt;execute() $(PROJECT_DIR)\apps\frontend\lib\sfGuardRememberMeFilter.class.php:65 0.3298 11740192 
  10. nonMemberCheckFilter-&gt;execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3299 11742280 
  11. sfFilterChain-&gt;execute() $(PROJECT_DIR)\apps\frontend\lib\nonMemberCheckFilter.class.php:68 0.3305 11757240 
  12. sfCacheFilter-&gt;execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3426 11776320 
  13. sfFilterChain-&gt;execute() $(SF_ROOT_DIR)\lib\filter\sfCacheFilter.class.php:65 0.3433 11793568 
  14. sfValidationExecutionFilter-&gt;execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3434 11795872 
  15. sfValidationExecutionFilter-&gt;handleAction() $(SF_ROOT_DIR)\lib\plugins\sfCompat10Plugin\lib\filter\sfValidationExecutionFilter.class.php:43 0.3600 11796712 
  16. sfValidationExecutionFilter-&gt;executeAction() $(SF_ROOT_DIR)\lib\plugins\sfCompat10Plugin\lib\filter\sfValidationExecutionFilter.class.php:87 0.3600 11797136 
  17. sfActions-&gt;execute() (SF_ROOT_DIR)\lib\plugins\sfCompat10Plugin\lib\filter\sfValidationExecutionFilter.class.php:169 0.3608 11820384 
  18. homeActions-&gt;executeTestnewmail() $(SF_ROOT_DIR)\lib\action\sfActions.class.php:60 0.4796 13858992 
  19. sfMailer-&gt;send() $(PROJECT_DIR)\apps\frontend\modules\home\actions\actions.class.php:621 0.4797 13859496 
  20. Swift_Mailer-&gt;send() $(SF_ROOT_DIR)\lib\mailer\sfMailer.class.php:294 0.4797 13860016 
  21. Swift_Transport_AbstractSmtpTransport-&gt;start() $(SF_ROOT_DIR)\lib\vendor\swiftmailer\classes\Swift\Mailer.php:74 0.4850 13876104 
  22. Swift_Transport_StreamBuffer-&gt;initialize() $(SF_ROOT_DIR)\lib\vendor\swiftmailer\classes\Swift\Transport\AbstractSmtpTransport.php:101 0.4850 13876448 
  23. Swift_Transport_StreamBuffer-&gt;_establishSocketConnection() $(SF_ROOT_DIR)\lib\vendor\swiftmailer\classes\Swift\Transport\StreamBuffer.php:70 0.4850 13877896 
  24. fsockopen() $(SF_ROOT_DIR)\lib\vendor\swiftmailer\classes\Swift\Transport\StreamBuffer.php:233 30.4772 13879672
  25. sfWebDebugLogger-&gt;handlePhpError() $(SF_ROOT_DIR)\lib\log\sfWebDebugLogger.class.php:0 
  </code></pre>
  
  <p>My mail configuration as specified in ($PROJECT_DIR)/apps/frontend/config/factories.yml is:</p>
  
  <pre><code># this is commented out because I want to be able to send mails in dev environment
  #dev:
  #  mailer:
  #    param:
  #      delivery_strategy: none
  
    test:
      mailer:
        param:
          delivery_strategy: none
  
  
    all:
      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:   ~
              password:   ~
  </code></pre>
  
  <p><strong>[Edit2]</strong></p>
  
  <p>My php.ini settings (with regards to SMTP) are:</p>
  
  <pre><code>[mail function]
  ; For Win32 only.
  ;SMTP = localhost
  SMTP = smtp.my-isp-address-here
  smtp_port = 25
  </code></pre>