C
cmcvicker
I have the following code in an ASP webpage where a member has logged
in and wants to change his company information. This page lists the
fields and records currently in our database (Access) and he is able to
make changes and submit it. My code updates the database fine and
redirects them to another page fine.
Now I want that information emailed to me as well. I have found code
and spent hours tweeking it to work and I finally get NO errors. The
only problem is that when I receive the e-mail, all of the fields say
undefined instead of the actual record. For instance:
THIS IS THE EMAIL:
Company: undefined
Division: undefined
Mailing Address: undefined
THIS IS THE CODE:
<%
var objCDO = Server.CreateObject("CDONTS.NewMail");
objCDO.From = "[email protected]"
objCDO.To = "[email protected]"
objCDO.Subject = "Member Company Updated!"
objCDO.Body = "The following member company information has been
updated." + "\n\n"
+ "Company: " + Request.Form("MbrCompany") + "\n"
+ "Division: " + Request.Form("email") + "\n"
+ "Mailing Address: " + Request.Form("MbrMailingAddress") + "\n"
+ "Mailing City, State, Zip: " + Request.Form("MbrMailingCity") + " "
+ Request.Form("MbrMailingState") + " " + Request.Form("MbrMailingZip")
+ "\n\n"
+ "Shipping Address: " + Request.Form("MbrShippingAddress") + "\n"
+ "Shipping City, State, Zip: " + Request.Form("MbrShippingCity") + "
" + Request.Form("MbrShippingState") + " " +
Request.Form("MbrShippingZip") + "\n\n"
+ "Phone: " + Request.Form("MbrMainPhone") + "\n"
+ "Alt Phone: " + Request.Form("MbrAltPhone") + "\n"
+ "Fax: " + Request.Form("MbrMbrFax") + "\n"
+ "Intl Phone: " + Request.Form("MbrPhoneIntl") + "\n"
+ "Intl Fax: " + Request.Form("MbrFaxIntl") + "\n"
+ "Email: " + Request.Form("MbrEmail") + "\n"
+ "Website: " + Request.Form("MbrWebsite") + "\n\n"
+ "Please file this in the member's folder."
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send()
objCDO = null
%>
Any help????
in and wants to change his company information. This page lists the
fields and records currently in our database (Access) and he is able to
make changes and submit it. My code updates the database fine and
redirects them to another page fine.
Now I want that information emailed to me as well. I have found code
and spent hours tweeking it to work and I finally get NO errors. The
only problem is that when I receive the e-mail, all of the fields say
undefined instead of the actual record. For instance:
THIS IS THE EMAIL:
Company: undefined
Division: undefined
Mailing Address: undefined
THIS IS THE CODE:
<%
var objCDO = Server.CreateObject("CDONTS.NewMail");
objCDO.From = "[email protected]"
objCDO.To = "[email protected]"
objCDO.Subject = "Member Company Updated!"
objCDO.Body = "The following member company information has been
updated." + "\n\n"
+ "Company: " + Request.Form("MbrCompany") + "\n"
+ "Division: " + Request.Form("email") + "\n"
+ "Mailing Address: " + Request.Form("MbrMailingAddress") + "\n"
+ "Mailing City, State, Zip: " + Request.Form("MbrMailingCity") + " "
+ Request.Form("MbrMailingState") + " " + Request.Form("MbrMailingZip")
+ "\n\n"
+ "Shipping Address: " + Request.Form("MbrShippingAddress") + "\n"
+ "Shipping City, State, Zip: " + Request.Form("MbrShippingCity") + "
" + Request.Form("MbrShippingState") + " " +
Request.Form("MbrShippingZip") + "\n\n"
+ "Phone: " + Request.Form("MbrMainPhone") + "\n"
+ "Alt Phone: " + Request.Form("MbrAltPhone") + "\n"
+ "Fax: " + Request.Form("MbrMbrFax") + "\n"
+ "Intl Phone: " + Request.Form("MbrPhoneIntl") + "\n"
+ "Intl Fax: " + Request.Form("MbrFaxIntl") + "\n"
+ "Email: " + Request.Form("MbrEmail") + "\n"
+ "Website: " + Request.Form("MbrWebsite") + "\n\n"
+ "Please file this in the member's folder."
objCDO.BodyFormat = 1
objCDO.MailFormat = 1
objCDO.Send()
objCDO = null
%>
Any help????