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