Use this class if you need to send attachments inside your application. At the moment this class will send text only mails with multiple attatchements. I wrote this class to use it togther with classes like Access_user or DB_cart. If you need some upload functionality than the easy upload class should be good for you.
For a first test unpack all files into a directory, and modify this row inside the example file (the example attachment files are an image and an image inside a zip file):
require($_SERVER['DOCUMENT_ROOT']."/classes/attach_mailer/attach_mailer_class.php");
define("LIBR", "\r\n");
This is a very important variable, in some cases you have to switch between "\r\n" and "\n".
var $mail_priority = 3;
The mail priority, possible values are: 3 = normal, 2 = high, 4 = low (or others be carefull)
attach_mailer($name = "", $from, $to, $cc = "", $bcc = "", $subject = "", $body = "")
The counstructor method, the attributes "$from" and "$to" are required. While creating an object only the input (e-mail addresses) is validated and if all data is OK a boolean is set. Only if the boolean ($valid_mail_adresses) is "true" a mail will be send.
create_attachment_part($file, $dispo = "attachment")
Use this method for every attachment you want to sell, inside a loop its very easy to handle a dynamic number of files. The second attrubute "$dispo" is important for a later version if hhtml is possible. (switch between "attachment" and "inline")
process_mail()
This method wil send the mail if the boolean ($valid_mail_adresses) is "true". You have to know that its also possible to send an empty mail with only the "from" and "to" e-mail addresses.
get_msg_str()
This method is used to output all messages (from the array $msg) created while using the class.
This example will send a short mail with to attachments to three e-mail addresses (to, Cc and Bcc).