Core Boxx – Mail 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.

 

TABLE OF CONTENTS

Download & Notes Quick Reference

 

 

DOWNLOAD & NOTES

First, here are the download links and a quick “setup guide” for the impatient folks who don’t have the patience to read through everything.

 

DOWNLOAD LINKS

Download Core Boxx Mail Module | GitHubSource Forge

 

LICENSE

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.

 

 

INSTALLATION & REQUIREMENTS

  • 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.

 

QUICK REFERENCE

This section is a quick walkthrough of the general module structures.

 

BASIC USAGE

$_CORE->load("Mail");
echo $_CORE->Mail->send([
  "from" => "sys@site.com", // OPTIONAL
  "to" => "job@doe.com",
  "cc" => "joe@doe.com", // OPTIONAL
  "bcc" => "jon@doe.com", // OPTIONAL
  "subject" => "Test Email",
  "body" => "This is a <strong>TEST</strong> email",
  "attach" => "PATH/IMAGE.JPG" // OPTIONAL
]) ? "OK" : $_CORE->error ;

// TO, CC, BCC CAN ALSO BE AN ARRAY OF EMAIL
// "to" => ["jac@doe.com", "jan@doe.com", "jay@doe.com"]
// ATTACH CAN ALSO BE AN ARRAY OF FILES
// "attach" => ["FILE-1", "FILE-2"]

Yep, the mail module only has one send() function. The bare minimum is to specify the to, subject, and body.

 

 

SEND ONE AT A TIME

$_CORE->load("Mail");
$_CORE->send([
  "to" => ["jac@doe.com", "jan@doe.com", "jay@doe.com"],
  "subject" => "Test",
  "body" => "Test"
], false);

Notice the second parameter is set to false. This will send the email out one-by-one instead, that is one email for jac@doe.com, one for jan@doe.com, and one for jay@doe.com. Good for newsletters, but take note that CC and BCC will be ignored in this mode.

 

Leave a Comment

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