HelPHP

Mail
in package

Tags
class

Mail

Sending email is now quit complecate due to the number of security you have to pass thru, it's not enough to have the perfect mail server, but the format of you email and its headers must be correct too.

Based on PHPmailer that you can find in libs/external,

this class has the single objective to send mail properly based on the config/email.php from your instance, please take a look at this config file to set options and signatures.

Usage : $my_mail=new Mail();

to embed an image $my_mail->mail->AddEmbeddedImage($path, $name);

to attach a file $my_mail->mail->addAttachment($path, $name );

to send it : $my_mail->send($to, $subject, $message, $from = null, $cc = false, $naming=false)

the send function is calling phpmailer, but if for any reason you have to use some simplier function or older ones you'll find :

send0 : the smallest sending function with miminal hearders

send1 : the same as send 0 but with html utf-8 doubled content

send2 : the same as send 1 but with multipart boundary, that allow you to add attachment as multipart in the message. (the old fashion method)

(if you don't use commercial smtp and you need your own mailserver take a look on https://github.com/docker-mailserver/docker-mailserver)

@see https://github.com/PHPMailer/PHPMailer/ please support their project

Table of Contents

Properties

$mail  : mixed

Methods

__construct()  : mixed
check_adress()  : mixed
send()  : mixed
send0()  : mixed
send1()  : mixed
send2()  : mixed

Properties

$mail

public mixed $mail = null

Methods

__construct()

public __construct() : mixed

check_adress()

public static check_adress(mixed $email) : mixed
Parameters
$email : mixed

send()

public send(mixed $to, mixed $subject, mixed $message[, mixed $from = null ][, mixed $cc = false ][, mixed $naming = false ]) : mixed
Parameters
$to : mixed
$subject : mixed
$message : mixed
$from : mixed = null
$cc : mixed = false
$naming : mixed = false

send0()

public static send0(mixed $to, mixed $subject, mixed $message[, mixed $from = null ]) : mixed
Parameters
$to : mixed
$subject : mixed
$message : mixed
$from : mixed = null

send1()

public static send1(mixed $to, mixed $subject, mixed $message[, mixed $from = null ]) : mixed
Parameters
$to : mixed
$subject : mixed
$message : mixed
$from : mixed = null

send2()

public static send2(mixed $to, mixed $subject, mixed $message[, mixed $from = null ]) : mixed
Parameters
$to : mixed
$subject : mixed
$message : mixed
$from : mixed = null

        
On this page

Search results