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.
string
the mail host
string
the mail port
string
[optional] the mail encryption
string
[optional] the mail user
string
[optional] the mail password
\Swift_SmtpTransport
Swift_MailTransport the transport objectcreateMessage(string $service) : object
inherited_from | \Swift_Mailer::createMessage() |
---|
string
object
newInstance(\Swift_Transport $transport) : \Swift_Mailer
registerPlugin(\Swift_Events_EventListener $plugin)
myPlugin).
inherited_from | \Swift_Mailer::registerPlugin() |
---|
\Swift_Events_EventListener
resendMail(int $idmailsuccess)
int
the 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
int
sendMail(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.
string
array
the sender of the mail, if something "empty" is given, default address from CONTENIDO system settings is used
string
array
one or more recipient addresses
string
the subject of the mail
string
[optional] the body of the mail
string
array
[optional] one or more recipient addresses which should get a normal copy
string
array
[optional] one or more recipient addresses which should get a blind copy
string
array
[optional] address to which replies should be sent
bool
[optional] whether the mail is resent
int
number 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.
string
the character encoding
_logMail(\Swift_Message $message, array $failedRecipients) : \the
array
[optional] the recipient addresses that did not get the mail
\the
idmail of the inserted table row in con_mail_logdecodeField(string | array $value, string $charset) : string | array
string
array
the value to decode
string
the charset to use in htmlentities
string
array
the decoded valueencodeField(string | array $value, string $charset) : string | array
string
array
the value to encode
string
the charset to use in htmlentities
string
array
the encoded value$_mailEncryption : string
$_mailHost : string
$_mailPass : string
$_mailPort : int
$_mailSender : string
$_mailSenderName : string
$_mailUser : string
$_transport
inherited_from | \Swift_Mailer::$$_transport |
---|