kodjunkie / PHPmailer

A simple PHP mailer package with zero dependencies.

Home Page:https://kodjunkie.github.io/PHPmailer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHPmailer

A simple PHP mailer package with zero dependencies.

This package let you send highly customizable HTML emails and works straight out of the box. Just drop it in your server and you are all set.

logo

Requirement

PHP 5 >= 5.1.0, PHP 7

Installation

It works straight out of the box. All you have to do is

  • Browse into your root directory (public_html or www)
  • In your terminal or CLI run git clone https://github.com/kodjunkie/PHPmailer.git
  • Lastly visit https://your-site-url/PHPmailer

OR

Configuration (optional)

To enable IP Ban and / or Activity Logging.

Open includes/init.php in your favourite editor and uncomment these

//bannedIPs();

//logActivity();

TO

bannedIPs();

logActivity();

By default it saves the log file in its root directory (PHPmailer) but you can specify log file name and location name as follows

logActivity('path/filename.log');

By default it validates emails. To disable, open handler.php in your editor and change

$mail->validate()->send();

To

$mail->send();

Mail Template

You can have as many mail templates as you desire. Just put them in the templates folder and have these placeholders in them

$recipientName (optional)   -   Gets replaced by the email(without @domain.com)
$recipientEmail (optional)  -   Gets replaced by the full email(username@domain.com)
$message (required)         -   Gets replaced by the message content

Then open handler.php and specify the template name as the sixth argument to SendMail class, like below.

// Instantiate the mail object
$mail = new SendMail($subject, $message, $from, $to, $sendToGroup, 'template_name.html');
if (isset($emailList) && is_file($emailList)) {
    $mail = new SendMail($subject, $message, $from, $emailList, $sendToGroup, 'template_name.html');
}

🔥 🚀

About

A simple PHP mailer package with zero dependencies.

https://kodjunkie.github.io/PHPmailer


Languages

Language:PHP 88.1%Language:CSS 7.7%Language:JavaScript 2.7%Language:HTML 1.5%