Forums
This topic is locked
Charon: Insert record and Email form
Posted 06 Oct 2002 19:21:40
1
has voted
06 Oct 2002 19:21:40 Mitchel Tendler posted:
Hi,I have repeatedly been able to make the "Insert record and Email form" work on some of my clients web sites, the problem is that my new clients server does not have CDONTS, they use ASPMail.
I can make a simple ASPMail form work, but when I try to adapt the ASPMail code to the form that should submit the infromation to the database and then send out the e-mail, only the database portion works, the e-mail is never sent.
Help.....thanks, Mitch
This is the code from the form page with ASPMail:
_____________________________________________________________
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/wwwc.asp" -->
<%
If (CStr(Request("MM_insert"


Set Mailer = Server.CreateObject("SMTPsvg.Mailer"

Mailer.FromName = "Walla Walla Wine Club Join the Club"
Mailer.FromAddress = " "
' localhost is required by the hosting company, it works on the simple form
Mailer.RemoteHost = "localhost"
Mailer.AddRecipient "Join the Club", " "
Mailer.Subject = "I want to JOIN THE CLUB!"
Mailer.BodyText = "This is the subject" & Request.Form ("varSubject"

Mailer.BodyText = "Billing Address Name: " & " " & Request("billing_address_name"

Mailer.BodyText = "Billing Address: " & " " & Request("billing_address"

Mailer.BodyText = "Billing City: " & " " & Request("billing_city"

Mailer.BodyText = "Billing State: " & " " & Request("billing_state"

Mailer.BodyText = "Billing Zip: " & " " & Request("billing_zip"

Mailer.BodyText = "Billing Dayphone: " & " " & Request("billing_dayphone"

Mailer.BodyText = "Billing Email: " & "<br>" & "<br>" & Request("billing_email"

Mailer.BodyText = "Ship to Address Name: " & "<br>" & "<br>" & Request("ship_to_address_name"

Mailer.BodyText = "Ship to Address: " & " " & Request("ship_to_address"

Mailer.BodyText = "Ship to City: " & " " & Request("ship_to_city"

Mailer.BodyText = "Ship to State: " & " " & Request("ship_to_state"

Mailer.BodyText = "Ship to Zip: " & " " & Request("ship_to_zip"

Mailer.BodyText = "Ship to Dayphone: " & " " & Request("ship_to_dayphone"

Mailer.BodyText = "Ship to Email: " & " " & Request("ship_to_email"

Mailer.BodyText = "Gift Membership: " & "<br>" & "<br>" & Request("gift_membership"

Mailer.BodyText = "Gift Message: " & "<br>" & "<br>" & Request("gift_message"

Mailer.BodyText = "Bottles per Shipment: " & " " & Request("bottles_per_shipment"

Mailer.BodyText = "How Many Shipments: " & " " & Request("how_many_shipments"

Mailer.BodyText = "Ship to State: " & " " & Request("ship_to_state"

Mailer.BodyText = "Ship to Zip: " & " " & Request("ship_to_zip"

end if
%>