|
Hi all, this is my first post so please excuse any ignorance...
I am working on a website that has a shopping cart. The order for the cart is generated using javascript and SQL on as ASP page. No problems yet.
The problem is with sending the order as an email to the company.
The (abbreviated) code is below, the variables: (email, subject, message, order_id, etc..) are all getting assigned values appropriately.
Here's the main code I'm concerned with:
<%@ Language=JScript %>
<%
con = db_connect_ ();
con.Execute (...some SQL...);
rs = con.Execute (...more SQL...);
con = db_connect_ ();
rs.Close ();
con.Close ();
mail = Server.CreateObject ("CDONTS.NewMail");
mail.Subject = "Order #" + order_id + "\n";
mail.From = name + "@seauto.com";
mail.To = "cort@mrexcel.com";
mail.Cc = email;
mail.Body = mail_body;
mail.Send();
%>
<?php
// Your email address
$email = "cort@mrexcel.com";
// The subject
$subject = "Enter your subject here";
// The message
$message = "Enter your message here";
mail($email, $subject, $message, "From: $email");
echo "The email has been sent.";
?>
The mail.send() command is just not working.
No errors are produced, but no email is sent. I've researched this a bunch, and it seems windows XP doesn't support the CDONTS mail object. I read you can use 'jmail', but I don't understand how to "register the class" on my server. I would rather use PHP, you can see my attempt at the end of the code segment, but that doesn't work either.
Any suggestion? ...I'm desparate.
All I need to do is send an email with the values of the above-listed variables in the email.
Many thanks,
Cort
MrExcel.com
|