Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Symfony2 Essentials

You're reading from   Symfony2 Essentials

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781784398767
Length 158 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Swiftmailer


As mentioned earlier, Symfony2 provides a default mailer component called swiftmailer. Its default configuration looks like this:

# app/config/config.yml
# ...
# Swiftmailer Configuration
swiftmailer:
    transport: "%mailer_transport%"
    host:      "%mailer_host%"
    username:  "%mailer_user%"
    password:  "%mailer_password%"
    spool:     { type: memory }

The parameters are taken from the parameters.yml file. By default, swiftmailer sends from a locally configured SMTP host, so check your configuration and adapt it as required.

There is one configuration tweak added by default to config_dev.yml (so working only in the development mode):

#swiftmailer:
#    delivery_address: me@example.com

When uncommented and configured, it will cause swiftmailer to send any e-mail to this specific address, while in the development mode. This is a very useful option, as it allows us to test any e-mail to be sent to any user without sending the real e-mail to them.

Note

This is only a basic list...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image