ZMObject
└─ZMMailer
public class ZMMailer
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| mixed | getMailer(mixed transport) Get a mailer instance. |
| mixed | getMessage(string subject, string body, string contentType, string charset) Get message. |
| mixed | Get a transport. |
| static void | instance() Get instance. |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public void __construct()
Create new instance.
public mixed getMailer(mixed transport)
Get a mailer instance.
null to use the default transport.public mixed getMessage(string subject, string body, string contentType, string charset)
Get message.
null.utf-8>public mixed getTransport()
Get a transport.
public static void instance()
Get instance.
SwiftMailer Email service.
Thin wrapper for SwiftMailer, mostly to centralize initialization and such.
Due to the mostly generic function/method names it should be easy to replace this with some other library without causing too much trouble.
Supports the following transports (the transport is configured via the setting 'zenmagick.core.email.transport'):
Requires the following settings:
Use PHP's mail interface.
Use sendmail. The default sendmail path (and parameters) is
/usr/sbin/sendmail -bs. If this needs to be changed you may set 'zenmagick.core.email.sendmail' to whatever the path is.