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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:43:53+00:00 2026-06-11T10:43:53+00:00

In my Symfony2.1 application I’m using the SwiftMailer to send emails. Since I’m in

  • 0

In my Symfony2.1 application I’m using the SwiftMailer to send emails. Since I’m in dev mode, I’m not sending emails for reals. I control the output in the toolbar provided by the Profiler.

The email I’m sending is in HTML. So, to ensure HTML output I did the following settings:

$message = \Swift_Message::newInstance()
        ->setContentType("text/html")
        ->setSubject('Conferma registrazione nuovo utente')
        ->setFrom('xxx@xxx.com')
        ->setTo($email)
        ->setBody($this->renderView('AcmeMessageBundle:Contact:contact_request_email.html.twig', 'text/html');

$this->get('mailer')->send($message);

I suppose all the setting for HTML emails are ok. Notwithstanding that, I see that the emails sent are not shown as HTML in the Profiler dedicated area. In particular, all the HTML tags are escaped! Why? What am I missing in the settings?

  • 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-06-11T10:43:55+00:00Added an answer on June 11, 2026 at 10:43 am

    For dev it is recommended to set up something like Gmail to deal with emails

    # app/config/config_dev.yml
    swiftmailer:
        transport: gmail
        username:  your_gmail_username
        password:  your_gmail_password
    

    As for HTML emails, I can’t tell exactly what’s your problem, it could be anything. HTML emails are not easy (it’s like developing for IE6), that’s why a lot of devs just choose to send text emails.

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

Sidebar

Related Questions

I am developing an application using symfony2 and twig for templates. The problem comes
I am using Symfony2 and Doctrine2 to build an application. One part of the
I am developing an application using Symfony2. I am using Twig for templating an
I am developing an application using Symfony2 and DQL for building some queries in
I am developing an application using Symfony2 and Jquery as a JavaScript FW. I
I am developing an application using symfony2. I would like to know how I
I am developing an application using Symfony2. The problem comes when creating a registration
I could use some help on this problem. I'm creating an application using Symfony2
In my application we send notification emails at the moment, for example, when your
I am using jQuery in my Symfony2 application and I have a ReferenceError: jQuery

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.