sunny_day SG im currently doing my attachment.. i need to help re-do and maintain the co's website.. recently, we just switched to a windows server. so i need to translate the PHP codes to ASP. im stucked at these... <? $receiver_email="[email protected]"; $message="The following message has been entered from ABC website."; $message.="\nMessage Detail:"; $message.="\nName : ".$_POST['name']; $message.="\nCompany : ".$_POST['company']; $message.="\nEmail : ".$_POST['email']; $message.="\nPhone : ".$_POST['phone']; $message.="\nNature of feedback : ".$_POST['nature']; $message.="\nMessage : \n".$_POST['message']; $mail_header="From: {$_POST[email]}\r\n" . "Reply-To: {$_POST[email]}\r\n" . "X-Mailer: PHP/" . phpversion(); mail($receiver_email, "[abc web] contact form", $message,$mail_header); ?> anyone knows PHP codes? can help me to translate them into ASP? this is a "contact us" form. or anyone know which sites provide free translation? from PHP to ASP... i only managed to find translation from ASP to PHP
MCY SG Try this : <% Set objNewMail = Server.CreateObject( "CDONTS.NewMail " ) objNewMail.To = "[email protected]" objNewMail.From = Request.form( "email" ) ' message subject objNewMail.Subject = "The following message has been entered from ABC website." ' message body objNewMail.Body = "Message Detail:" & chr(10) &_ "Name: " & Request.form( "name" ) & chr(10) &_ "Company: " & Request.form( "company" ) & chr(10) &_ "Email: " & Request.form( "email" ) & chr(10) &_ "Phone: " & Request.form( "phone" ) & chr(10) &_ "Nature of feedback: " & Request.form( "nature" ) & chr(10) &_ "Message: " & Request.form( "message" ) strErr = "" bSuccess = False On Error Resume Next ' catch errors objNewMail.Bcc = "" objNewMail.Send ' send message Set objNewMail = Nothing If Err <> 0 Then ' error occurred strErr = Err.Description else bSuccess = True End If ' if you have any thank you message for the user Response.Redirect "thankyou.htm" %>
sunny_day SG hihi... thx for ur reply... =) i've PM you the codes... sorry to trouble you... thx thx...
MCY SG ASP code can only work if your file is in asp e.g. contact.asp instead of contact.html (asp codes won't work in html extension) See your pm.
sunny_day SG i have an error when i preview it on localhost.. it says line 115 has problem.. Set objNewMail = Server.CreateObject( "CDONTS.NewMail " ) i've copy & paste the codes into the contact us page and changed it to contact us.asp hmmm... do you have any idea wat that error is?