michigan search engine optimization, ecommerce consulting and web development
  about | contact us | latest news | home
michigan search engine optimizaton

4word systems news
All Natural Products
Lover's Lane Store Launch
Launching 2008
4ws Mourns Loss
LaneCostumes.com Launch
Brighton July 4 Parade
Brighton Summerfest Launch
Duncan Chiropractic Launch
Entertainment Express Launch
CallRecordingCenter.com Launch
Mattress.US.com Launch
Brighton Ford-Mercury Launches
Crain's Detroit Business
Jim Mitte Joins 4word systems
Red Letter, Inc

downtown brighton michigan, home of michigan search engine optimization company, 4word systems

PHP Email Attachment Script

php email attachment scriptFinally, it's quick and easy to send an email attachment using PHP from your web pages or forms!

Attach multiple files to a single email message!

Just include this PHP Email Attachment script in your web page, and call the mail_attachment function. Supply the path to the file you wish to send as the email attachment to the call.

function mail_attachment ($from , $to, $subject, $message, $attachment)

The email attachment script will strip off the path information from the file, attach it to the email, and send it to the specified recipient. You pass in the full path to the file, as in /var/www/images/my_family_photo.jpg, and your user will receive an email with an attachment titled "my_family_photo.jpg" in their inbox, along with the subject and message text of your choice.

Sample code:

<? include "mail_attachment.php";
mail_attachment("sales@4wordsystems.com", "customer@aol.com",
"Your Attachment", "Here is the file you requested",
"/var/www/images/my_file.jpg");
?>

A free version of the PHP Email Attachment script is also available. The free version includes a small notice at the bottom of each email stating that the email was generated using free code from 4word systems. If you do not wish to have this notice in your outgoing email, please purchase the commercial PHP Email Attachment script for only $3.49 USD.

The commercial version of the email attachment script also supports multiple attachments on a single email. To take advantage of the multiple attachment feature, you simply pass a ";" seperated list of files you want to attach. Here is an example:

<? include "mail_attachment.php";
mail_attachment("sales@4wordsystems.com", "customer@aol.com",
"Your Attachment", "Here is the file you requested",
"/var/www/images/my_file.jpg;/var/www/images/another_file.jpg");
?>

The email will be sent with all files in the list attached.

Solution Graphics
810.229.8515 | 10315 e grand river, suite 202 | brighton mi 48116