Mailer class which should be used for all mail sending purposes.
| package | Core |
|---|---|
| subpackage | Util |
| author | Chris Corbyn |
constructTransport(string $mailHost, string $mailPort, string $mailEncryption, string $mailUser, string $mailPass) : \Swift_SmtpTransport
If this is possible, a Swift_SmtpTransport object is returned. Otherwise a simple Swift_MailTransport object is returned.
stringthe mail host
stringthe mail port
string[optional] the mail encryption
string[optional] the mail user
string[optional] the mail password
\Swift_SmtpTransportSwift_MailTransport the transport objectcreateMessage(string $service) : object
| inherited_from | \Swift_Mailer::createMessage() |
|---|
string
objectnewInstance(\Swift_Transport $transport) : \Swift_Mailer
registerPlugin(\Swift_Events_EventListener $plugin)
myPlugin).
| inherited_from | \Swift_Mailer::registerPlugin() |
|---|
\Swift_Events_EventListener
resendMail(int $idmailsuccess)
intthe ID of the mail which should be resend
\cInvalidArgumentException |
if the mail has already been sent successfully or does not exist |
|---|
send(\Swift_Mime_Message $message, array $failedRecipients, $resend) : int
All recipients (with the exception of Bcc) will be able to see the other recipients this message was sent to.
Recipient/sender data will be retrieved from the Message object.
The return value is the number of recipients who were accepted for delivery.
| see | \Swift_Mailer::send() |
|---|
\Swift_Mime_Message
array&$failedRecipients, optional
intsendMail(string | array $from, string | array $to, string $subject, string $body, string | array $cc, string | array $bcc, string | array $replyTo, bool $resend, $contentType) : int
All parameters which accept mail addresses also accept an array where the key is the email address and the value is the name.
stringarraythe sender of the mail, if something "empty" is given, default address from CONTENIDO system settings is used
stringarrayone or more recipient addresses
stringthe subject of the mail
string[optional] the body of the mail
stringarray[optional] one or more recipient addresses which should get a normal copy
stringarray[optional] one or more recipient addresses which should get a blind copy
stringarray[optional] address to which replies should be sent
bool[optional] whether the mail is resent
intnumber of recipients to which the mail has been sentsetCharset(string $charset)
If you want to use UTF-8, you do not need to call this method.
stringthe character encoding
_logMail(\Swift_Message $message, array $failedRecipients) : \the
array[optional] the recipient addresses that did not get the mail
\theidmail of the inserted table row in con_mail_logdecodeField(string | array $value, string $charset) : string | array
stringarraythe value to decode
stringthe charset to use in htmlentities
stringarraythe decoded valueencodeField(string | array $value, string $charset) : string | array
stringarraythe value to encode
stringthe charset to use in htmlentities
stringarraythe encoded value$_mailEncryption : string
$_mailHost : string
$_mailPass : string
$_mailPort : int
$_mailSender : string
$_mailSenderName : string
$_mailUser : string
$_transport
| inherited_from | \Swift_Mailer::$$_transport |
|---|