PDA

View Full Version : Help with ASP contact form



boodaddymac
01-27-2008, 12:56 PM
I have this code to my form. It works great but I want to add a blind copy email in the code. I have tried everything and can't get it to work.. below is the code. Can anyone please help me...

Thanks for your time,

///<%
strToEmail = "myemailhere.com"
strToName = "my name"
strToSubject = "email subject here"

Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "mail-fwd"


strName = Request.form("name")
strEmail = Request.form("email")
strWebsite = Request.form("website")
strPhone = Request.form("phone")
strSubject = Request.form("subject")
strMesg = Request.form("mesg")
strBody = strMesg

Mailer.FromName = strName
Mailer.BodyText = strName
Mailer.BodyText = strSubject
Mailer.BodyText = strBody

Mailer.FromAddress = strEmail

Mailer.AddRecipient strToName, strToEmail
Mailer.BodyText = strEmail
Mailer.BodyText = strWebsite
Mailer.BodyText = strPhone
Mailer.Subject = (strToSubject)
if Mailer.SendMail then
Response.Write "status_box.status_text=Your message has been sent. Thank you."
else
Response.Write "status_box.status_text=Error: Fail to sent your message."
Response.Write Mailer.Response
end if
%>///

Askana
02-23-2008, 05:37 AM
In SMTPsvg.Mailer,

just provide

Mailer.AddBCC "Name of The Person", EmailAddress

example :

Mailer.AddBCC "Programmer", [email protected]

The 'Bcc' property holds the e-mail address of the people you wish to receive Blind Copies of the e-mail.