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 3721680
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:38:23+00:00 2026-05-19T05:38:23+00:00

I use Symfony 1.4 and I have two different configurations for the prod and

  • 0

I use Symfony 1.4 and I have two different configurations for the prod and dev environment, the former use the single_address as delivery strategy, and the latter use the spool:

dev:
  mailer:
    class: sfMailer
    param:
      delivery_strategy: single_address
      delivery_address:  my@email
      transport:
        class: Swift_SmtpTransport
[...]

prod:
  mailer:
    class: sfMailer
    param:
      delivery_strategy: spool
      spool_class:       Swift_PropelSpool
      spool_arguments:   [ MailMessage, message, getSpooledMessages ]      
      transport:
        class: Swift_SmtpTransport            

I was wondering if Symfony could add automatically, in the dev environment, some text to the mail subject (i.e. [DEVELOPMENT EMAIL – PLEASE DISCARD]).

Thanks a lot

  • 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-19T05:38:25+00:00Added an answer on May 19, 2026 at 5:38 am

    From the part where you are sending the e-mail you can use the sfConfig::get('sf_environment') variable to set your subject.

    <?php
    $subject = 'Some Subject';
    if (sfConfig::get('sf_environment') == 'dev')
    {
      $subject = '[DEVELOPMENT EMAIL - PLEASE DISCARD] ' . $subject;
    }
    

    To do this globally you can use a base Mailer class as described in http://www.symfony-project.org/gentle-introduction/1_4/en/11-Emails#chapter_11_email_messages_as_classes

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

Sidebar

Related Questions

How can I use two different tables for one entity in Symfony? I have
I use symfony 1.4.15 with doctrine. I have module and there are two i18n
I use symfony 1.4.15 with doctrine. And I have category and subcategory: Category: actAs:
I use symfony 1.4.11. I have frontend and backend form. Frontend : <?php {
I use symfony 1.4 In my index page, I have created some fields as
I'm looking for an IDE with use with the Symfony Framework . I have
I have an application written in symfony 1.4, and I'd like to use the
I use symfony 1.4.8 , and sfBBCodeParserPlugin It works , but I have problem
I just started to use symfony 1.4 and Doctrine. (Used 1.0 - 1.2 +
I want to use Symfony's FormFactory for handling FormType and FormHandler. Unfortunatly I don't

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.