Overview
Symfony Mailer is a PHP component for composing and sending email. It separates message construction from the transport used to deliver messages, which helps applications switch between SMTP and other supported delivery services.
Key capabilities
The component supports structured email messages, HTML and text content, attachments, addresses and configurable transports. It can be used within Symfony applications or integrated into other PHP projects through Composer.
Getting started
Install the package using Composer and configure a transport using credentials stored outside source control. Build messages with explicit sender, recipient and subject values, and handle delivery failures without exposing sensitive transport details to visitors.
Production considerations
Validate recipient input, protect credentials, configure a trustworthy sending domain and review provider limits. Email delivery is not guaranteed merely because a message was accepted by a local transport; monitor delivery outcomes where the provider offers them.