Download the PHP package alvlapo/phalcon-mailer without Composer
On this page you can find all versions of the php package alvlapo/phalcon-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alvlapo/phalcon-mailer
More information about alvlapo/phalcon-mailer
Files in alvlapo/phalcon-mailer
Package phalcon-mailer
Short Description Mailer wrapper over SwiftMailer and View component for Phalcon framework
License MIT
Informations about the package phalcon-mailer
phalcon-mailer
Mailer wrapper over SwiftMailer for Phalcon framework.
Usage
Configuration
There are several types of Transport in Swift Mailer, you create a Transport, use it to create the Manager, then you use the Manager to send the mail.
Sending the Email
Configuring The Sender
There are two ways to configure the sender.
First, you may use the from method within your Mail class' build method:
Instead, you may specify a global "from" address throw draft mail in your Manager instance. This address will be used by default for all you mails:
Example
Sending a message from the template
Sending a message from the template via a magic method call
Sending with a Mailable
Using mailable classes are a lot more elegant than the basic usage example above. Building up the mail in a mailable class cleans up controllers and routes, making things look a more tidy and less cluttered as well as making things so much more manageable.
All of a mailable class' configuration is done in the compose method. Within this method, you may call various methods such as from, subject, view, and attach to configure the email's presentation and delivery.
Mailable classes are required to extend the base Rotoscoping\Phalcon\Mailer\Mailable class;