I am very sorry when i disturb to you.
I have some problem with my send email code.
when i submit it run okey but i can not receive email.
Please help me to check my code
Code:Customertype=Request.Form("Customertype") senderemail=Request.Form("email") phone=Request.Form("phone") subject=Request.Form("subject") note=Request.Form("note") CustomerType=replace(CustomerType,"'","''") senderemail=replace(senderemail,"'","''") phone=replace(phone,"'","''") subject=replace(subject,"'","''") note=replace(note,"'","''") if Customertype="NTL" then cFromB ="[email protected]" else if Customertype="SGL" then cFromB ="[email protected]" else cFromB="[email protected]" end if end if SubjectText = "Infomation - " nd = "Information" & VbCrLf & VbCrLf nd = nd & "1. Information:" & VbCrLf nd = nd & "Customertype: " & Customertype & VbCrLf nd = nd & "Email: " & senderemail & VbCrLf nd = nd & "You have recived from : " & cFrom & VbCrLf nd = nd & "Phone: " & phone & VbCrLf nd = nd & "Subject: " & subject & VbCrLf nd = nd & "2. Noi dung lien lac:" & VbCrLf nd = nd & "Comment: " & note & VbCrLf DIM oMail, Flds, oMailConfig Set oMail = Server.CreateObject("CDO.Message") Set oMailConfig = CreateObject("CDO.Configuration") oMailConfig.Fields("(URL address blocked: See forum rules)") = "localhost" oMailConfig.Fields("(URL address blocked: See forum rules)") = 25 oMailConfig.Fields("(URL address blocked: See forum rules)") = 2 oMailConfig.Fields("(URL address blocked: See forum rules)") = 60 oMailConfig.Fields.Update Set oMail.Configuration = oMailConfig oMail.From = cFromB oMail.To = senderemail oMail.Subject= SubjectText oMail.TextBody = nd oMail.Send Set oMail = Nothing Set oMailConfig = Nothing
Thanks.
Regards
Hoang Phuc




Reply With Quote