Swift Mailer: PHP 5 library for sending e-mails

Swift Mailer is a component-based library for sending e-mails from PHP 5 applications. Swift Mailer operates on servers running PHP 5.2 or higher with the SPL extension (standard), Limited network access to connect to remote SMTP servers and 8 MB or more memory limit (Swift Mailer uses around 2 MB). Swift Mailer is made up of many classes. Each of these classes can be grouped into a general component group which describes the task it is designed to perform.

  • The Mailer; The mailer class, Swift_Mailer is the central class in the library where all of the other components meet one another. Swift_Mailer acts as a sort of message dispatcher, communicating with the underlying Transport to deliver your Message to all intended recipients
  • Transports; Transports are the classes in Swift Mailer that are responsible for communicating with a service in order to deliver a Message. There are several types of Transport in Swift Mailer, all of which implement the Swift_Transport interface and offer underlying start(), stop() and send() methods
  • MIME Entities; Everything that forms part of a Message is called a MIME Entity. All MIME entities in Swift Mailer share a common set of features. There are various types of MIME entity that serve different purposes such as Attachments and MIME parts
  • Encoders; Encoders are used to transform the content of Messages generated in Swift Mailer into a format that is safe to send across the internet and that conforms to RFC specifications
  • Plugins; Plugins exist to extend, or modify the behaviour of Swift Mailer. They respond to Events that are fired within the Transports during sending

Leave a Reply