12sendmimemail is a script that contains just one function. This function is called mimemail(). It can be used in any other php script, and its purpose is to send mime type emails using php's internal mail function. You can send an unlimited number of attachments and you can send it to an unlimited number of people. You can also use a html template to make it all a bit easier. All in all it's just a small and easy script to send a nice mail.
What do I need?
The script only uses PHP and you only have to be sure the mail() function of PHP is functioning OK. Ooh yeah, you also need another script to include this one in of course.
Who can use the script?
Unlike all other content on my site, my plugins and scripts are released under a GNU General Public License. A copy of the full license text is included with your Wordpress distribution and can also be found here. I appreciate it when you let me know if and how you use my script.
Installation?
You don't really have to install anything. The only thing you need to do is include this script into another script in which you want to use the mailfunction. All arguments of the function are put into an associative array that which is called $mailVars In the script which includes the function you have to define the elements of the array before you call the function. E.g.:
include("full/path/to/12sendmimemail.php");
$mailVars['elementname'] = elementvalue;
$result = mimemail($mailVars);
The result of the function is true when the message is send succesfully and false when it failed to send the message. The table below shows you all the elements that can be defined.
to |
string / array | emailaddress of the recipient; if more addresses are given the mail is send via BCC to protect the recipients emailaddress |
toname |
string / array | name of the recipient; if an array is specified the count of the elements must be the same as for to |
from |
string | emailaddress of the sender |
fromname |
string | name of the sender |
subject |
string | subject of the mail |
text |
string | message in text-only format |
html |
string | message in html-format |
template |
string | path to html-template file |
replace |
string / array | searches in the template for a string which looks like <!--%value%--> where value is the value of replace |
with |
string | the above value will be replaced by the value of with |
attachments |
string / array | contains path(s) to the files which need to be attached |
cc |
string / array | emailaddress(es) of CC recipient(s) |
ccname |
string / array | name(s) of the CC recipient(s), if an array is specified the count of the elements must be the same as for cc |
bcc |
string / array | emailaddress(es) of BBC recipients |
priority |
string | can have any value. if this is set the message will have high priority |
All this can also be found in the source of the script.
Can I see the script in action?
Unfortunately there is no demo of the script available. This is done to prevent abuse by spammers.
Download the script
You can download the script as a zip-file. This zip-file contains just 1 file which is 12sendmimemail.php. The current version is 0.3: download 12sendmimemail_v0.3.zip
Problems / Questions / Suggestions / Support?
Sorry, but I do longer give support for this plugin. Development has been dead for 2 years and this page is nothing more than an archive.
What changed?
0.3 Fixed a bug for sending an e-mail without attachments
0.2 Changed a few stupid errors in the script.
0.1 This is where it started and nothing changed so far.