Class cMailer
Mailer class which should be used for all mail sending purposes.
- Swift_Mailer
- cMailer
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Rusmir Jusufovic, Simon Sprankel
Located at classes/class.mailer.php
public
|
|
public static
Swift_SmtpTransport|Swift_MailTransport
|
#
constructTransport( string $mailHost, string $mailPort, string $mailEncryption = NULL, string $mailUser = NULL, string $mailPass = NULL )
Tries to establish an SMTP connection with the given settings. If this is possible, a Swift_SmtpTransport object is returned. Otherwise a simple Swift_MailTransport object is returned. |
public
|
#
setCharset( string $charset )
Sets the charset of the messages which are sent with this mailer object. If you want to use UTF-8, you do not need to call this method. |
public
integer
|
#
sendMail( string|array $from, string|array $to, string $subject, string $body = '', string|array $cc = NULL, string|array $bcc = NULL, string|array $replyTo = NULL, boolean $resend = false, string $contentType = 'text/plain' )
Wrapper function for sending a mail. All parameters which accept mail addresses also accept an array where the key is the email address and the value is the name. |
public
integer
|
|
public
|
|
private
string|array
|
#
encodeField( string|array $value, string $charset )
Encodes the given value / the given array values with htmlentities. |
private
string|array
|
#
decodeField( string|array $value, string $charset )
Decodes the given value / the given array values with html_entity_decode. |
private
string|boolean
|
private
string
|
$_mailHost | 'localhost' |
#
The mail host name |
private
string
|
$_mailUser | '' |
#
The username for authentication at the host |
private
string
|
$_mailPass | '' |
#
The password for authentication at the host |
private
string
|
$_mailEncryption | NULL |
#
The encryption method (ssl/tls). |
private
integer
|
$_mailPort | 25 |
#
The port to use at the host |
private
string
|
$_mailSender | 'noreply@contenido.org' |
#
The mail address of the sender |
private
string
|
$_mailSenderName | 'CONTENIDO Backend' |
#
The name of the sender |