Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 590721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:33:34+00:00 2026-05-13T15:33:34+00:00

I am trying to send email using the following method in my action class:

  • 0

I am trying to send email using the following method in my action class:

  public function executeTestnewmail()
  {
    // send an email to the affiliate
    $message = $this->getMailer()->compose(
      array('my_email_address_here' => 'Jobeet Bot'),
      'recipient_address_here',
      'Jobeet affiliate token',
      <<<EOF
Your Jobeet affiliate account has been activated.

Your token is 1.

The Jobeet Bot.
EOF
    );

    $this->getMailer()->send($message);

    $this->redirect('@homepage');
  }

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.

I get the following error messages in my log file:

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}(

Does this clue suggest anything at all to anyone?
Has anyone actually managed to send an email using SF1.3+ ?

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

[Edit]

The full stack trace is included below:

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->dispatch() $(PROJECT_DIR)\web\frontend_dev.php:13 0.2684 10774240 
3.  sfFrontWebController->dispatch() $(SF_ROOT_DIR)\lib\util\sfContext.class.php:170 0.2691 10795440 
4.  sfController->forward() $(SF_ROOT_DIR)\lib\controller\sfFrontWebController.class.php:48 0.3280 11707400 
5.  sfFilterChain->execute($(SF_ROOT_DIR)\lib\controller\sfController.class.php:235 0.3286 11715304 
6.  sfRenderingFilter->execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3286 11715768 
7.  sfFilterChain->execute() $(SF_ROOT_DIR)\lib\filter\sfRenderingFilter.class.php:33 0.3292 11725920 
8.  sfGuardRememberMeFilter->execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3292 11727680 
9.  sfFilterChain->execute() $(PROJECT_DIR)\apps\frontend\lib\sfGuardRememberMeFilter.class.php:65 0.3298 11740192 
10. nonMemberCheckFilter->execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3299 11742280 
11. sfFilterChain->execute() $(PROJECT_DIR)\apps\frontend\lib\nonMemberCheckFilter.class.php:68 0.3305 11757240 
12. sfCacheFilter->execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3426 11776320 
13. sfFilterChain->execute() $(SF_ROOT_DIR)\lib\filter\sfCacheFilter.class.php:65 0.3433 11793568 
14. sfValidationExecutionFilter->execute() $(SF_ROOT_DIR)\lib\filter\sfFilterChain.class.php:53 0.3434 11795872 
15. sfValidationExecutionFilter->handleAction() $(SF_ROOT_DIR)\lib\plugins\sfCompat10Plugin\lib\filter\sfValidationExecutionFilter.class.php:43 0.3600 11796712 
16. sfValidationExecutionFilter->executeAction() $(SF_ROOT_DIR)\lib\plugins\sfCompat10Plugin\lib\filter\sfValidationExecutionFilter.class.php:87 0.3600 11797136 
17. sfActions->execute() (SF_ROOT_DIR)\lib\plugins\sfCompat10Plugin\lib\filter\sfValidationExecutionFilter.class.php:169 0.3608 11820384 
18. homeActions->executeTestnewmail() $(SF_ROOT_DIR)\lib\action\sfActions.class.php:60 0.4796 13858992 
19. sfMailer->send() $(PROJECT_DIR)\apps\frontend\modules\home\actions\actions.class.php:621 0.4797 13859496 
20. Swift_Mailer->send() $(SF_ROOT_DIR)\lib\mailer\sfMailer.class.php:294 0.4797 13860016 
21. Swift_Transport_AbstractSmtpTransport->start() $(SF_ROOT_DIR)\lib\vendor\swiftmailer\classes\Swift\Mailer.php:74 0.4850 13876104 
22. Swift_Transport_StreamBuffer->initialize() $(SF_ROOT_DIR)\lib\vendor\swiftmailer\classes\Swift\Transport\AbstractSmtpTransport.php:101 0.4850 13876448 
23. Swift_Transport_StreamBuffer->_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->handlePhpError() $(SF_ROOT_DIR)\lib\log\sfWebDebugLogger.class.php:0 

My mail configuration as specified in ($PROJECT_DIR)/apps/frontend/config/factories.yml is:

# 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:   ~

[Edit2]

My php.ini settings (with regards to SMTP) are:

[mail function]
; For Win32 only.
;SMTP = localhost
SMTP = smtp.my-isp-address-here
smtp_port = 25
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:33:34+00:00Added an answer on May 13, 2026 at 3:33 pm

    You have another SMTP configuration in your php.ini file as in your factories.yml.
    In the first, you provide your ISP as SMTP server and in the later your own machine (localhost). But I guess you don’t have a SMTP server on your machine running, thats way it has to be ( I think):

     all:
        mailer:
          class: sfMailer
          param:
            logging:           %SF_LOGGING_ENABLED%
            charset:           %SF_CHARSET%
            delivery_strategy: realtime
            transport:
              class: Swift_SmtpTransport
              param:
                host:       smtp.your-isp-address-here
                port:       25
                encryption: ~
                username:   ~
                password:   ~
    

    But you can also setup swift mailer to send the emails via PHPs mail() function. This would then use your configuration in php.ini:

    all:
        mailer:
          class: sfMailer
          param:
            logging:           %SF_LOGGING_ENABLED%
            charset:           %SF_CHARSET%
            delivery_strategy: realtime
            transport:
              class: Swift_MailTransport
    

    This and a lot more can be read in More with Symfony – Chapter Emails 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send an email message using the .NET MailMessage class which can
I am trying to send an email using c# using the following code. MailMessage
I am trying to send an email using the following very standard code. However,
I am trying to send email using PHP mail. I get the following error:
I'm trying to send an email using codeigniter, and would like the message to
I am trying to send email using mail() in php. I need the message
I receive the following Exception while trying to send an email (using Seam) Caused
i`m trying to send an email using native email client on android phone. I
I am trying to send email using Exchange 2007 from a console app using
I am trying to send email using smtp authentication through google but I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.