Current location: Hot Scripts Forums » Programming Languages » PHP » need help to create a attachment on my email


need help to create a attachment on my email

Reply
  #1 (permalink)  
Old 10-22-04, 11:31 AM
frankkk frankkk is offline
New Member
 
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
need help to create a attachment on my email

hello
i have an online store that sends an email with the order to the owner. i need to change this email to a fax since there is no access to email in the actuall shop.
i have looked around trying to solve this dilema and the best thing i have cameup with is jfax. but they want the subject of the email as an attachment that will be sent with an empty email to the faxnumber@jfaxsend.com i have poked around in the files and i think this is the part that sends the email
CODE
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}

and this seems to be the email function
CODE
////
//! Send email (text/html) using MIME
// This is the central mail function. The SMTP Server should be configured
// correct in php.ini
// Parameters:
// $to_name The name of the recipient, e.g. "Jan Wildeboer"
// $to_email_address The eMail address of the recipient,
// e.g. jan.wildeboer@gmx.de
// $email_subject The subject of the eMail
// $email_text The text of the eMail, may contain HTML entities
// $from_email_name The name of the sender, e.g. Shop Administration
// $from_email_adress The eMail address of the sender,
// e.g. info@mytepshop.com

function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
if (SEND_EMAILS != 'true') return false;

// Instantiate a new mail object
$message = new email(array('X-Mailer: osCommerce Mailer'));

// Build the text version
$text = strip_tags($email_text);
if (EMAIL_USE_HTML == 'true') {
$message->add_html($email_text, $text);
} else {
$message->add_text($text);
}

// Send message
$message->build_message();
$message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
}

////


i want the content to be sent as an attachment
any help on how to do this would be greatly appreciated i have no experience in php and am just trying to figure this out so please help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-25-04, 03:10 PM
vek vek is offline
Newbie Coder
 
Join Date: Oct 2004
Location: Florence, Ky
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
If you look through the code of this script, you should be able to figure out how to attach a file...
http://zerovektor.com/files/filEmail.zip
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a Script from an Email newhorizonz Perl 6 09-24-04 07:36 PM
How do I create a HTML email with local links? ExtremeGuy HTML/XHTML/XML 0 06-02-04 11:47 AM
Declared Functions skipper23 PHP 4 12-17-03 11:06 AM
index page not showing up skipper23 PHP 3 12-15-03 02:10 PM
MIME Attachment for Email Form phpuser PHP 0 12-10-03 02:15 PM


All times are GMT -5. The time now is 09:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.