Core Boxx – Mail Module

 

 

SECTION A

DOWNLOAD & LICENSE

Download Core Boxx Mail ModuleSource Forge

Core Boxx is released under the MIT License. You are free to use it for your own personal and commercial projects, modify it as you see fit. On the condition that there the software is provided “as-is”. There are no warranties provided and “no strings attached”. Code Boxx and the authors are not liable for any claims, damages, or liabilities.

 

SECTION B

INSTALLATION

Download and set up the “main Core Boxx” if you have not already done so. Otherwise, there is no database nor anything “special” with this mail module.

 

 

SECTION C

WHAT IS THIS MODULE?

This is a simple mail module for Core Boxx – To help speed up and make sending emails a lot easier. Simply plug this one into Core Boxx, and it’s ready to use.

 

SECTION D

MAIL LIBRARY FUNCTIONS

Function Description & Quick Example
head() This is a helper function for the “send email” functions below.
send() Sends out the email after the preset is done.
sendOne() Sends out the email to the preset recipients one-by-one, instead of all-at-once.

 

SECTION E

USAGE EXAMPLES

Basic usage:

// (A) REQUIRED
$_CORE->extend("Mail");
$_CORE->Mail->to = "john@doe.com";
$_CORE->Mail->subject = "Test email";
$_CORE->Mail->body = "<h1>HELLO</h1><p>This is a test email.</p>";
 
// (B) OPTIONAL - SET CC/BCC USING STRING OR ARRAY
$_CORE->Mail->cc = "joy@doe.com"; 
$_CORE->Mail->bcc = ["jon@doe.com", "jody@doe.com"];
 
// (C) SEND
$_CORE->Mail->send();

Two ways to send to multiple people:

// (A) PRESET
$_CORE->extend("Mail");
$_CORE->Mail->to = ["john@doe.com", "jon@doe.com", "joe@doe.com"];
$_CORE->Mail->subject = "Test email";
$_CORE->Mail->body = "<h1>HELLO</h1><p>This is a test email.</p>";
 
// (B) SEND
$_CORE->Mail->send(); // WILL SEND SINGLE MAIL TO ALL 3 AT ONCE.
$_CORE->Mail->sendOne(); // WILL 3 EMAILS. EACH TO JOHN, JON, JOE.

Leave a Comment

Your email address will not be published. Required fields are marked *