PHP Класс Mail, huge

User: Hp Date: 06/06/2015 Time: 14:33
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getError ( ) : mixed The different mail sending methods write errors to the error property $this->error, this method simply returns this error / error array.
sendMail ( $user_email, $from_email, $from_name, $subject, $body ) : boolean The main mail sending method, this simply calls a certain mail sending method depending on which mail provider you've selected in the application's config.
sendMailWithNativeMailFunction ( ) Try to send a mail by using PHP's native mail() function.
sendMailWithPHPMailer ( $user_email, $from_email, $from_name, $subject, $body ) : boolean Try to send a mail by using PHPMailer.
sendMailWithSwiftMailer ( ) : boolean Try to send a mail by using SwiftMailer.

Описание методов

getError() публичный Метод

The different mail sending methods write errors to the error property $this->error, this method simply returns this error / error array.
public getError ( ) : mixed
Результат mixed

sendMail() публичный Метод

The main mail sending method, this simply calls a certain mail sending method depending on which mail provider you've selected in the application's config.
public sendMail ( $user_email, $from_email, $from_name, $subject, $body ) : boolean
$user_email string email
$from_email string sender's email
$from_name string sender's name
$subject string subject
$body string full mail body text
Результат boolean the success status of the according mail sending method

sendMailWithNativeMailFunction() публичный Метод

Please note that not PHP itself will send a mail, it's just a wrapper for Linux's sendmail or other mail tools Good guideline on how to send mails natively with mail():
См. также: http://stackoverflow.com/a/24644450/1114320
См. также: http://www.php.net/manual/en/function.mail.php

sendMailWithPHPMailer() публичный Метод

Make sure you have loaded PHPMailer via Composer. Depending on your EMAIL_USE_SMTP setting this will work via SMTP credentials or via native mail()
public sendMailWithPHPMailer ( $user_email, $from_email, $from_name, $subject, $body ) : boolean
$user_email
$from_email
$from_name
$subject
$body
Результат boolean

sendMailWithSwiftMailer() публичный Метод

Make sure you have loaded SwiftMailer via Composer.
public sendMailWithSwiftMailer ( ) : boolean
Результат boolean