I have this code below. I am not recieving any email in my inbox. When I checked I see that all are going to inetpub/mailroot/drop with the message that delivery failed. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <html> <body> <% dim firstname, lastname, email, confirmemail, msg, body, mail firstname=Request.Form("firstname") lastname=Request.Form("lastname") email=Request.Form("email") confirmemail=Request.Form("confirmemail") msg=Request.Form("msg") body=body & "First Name:"& firstname & VbCrLf body=body & "Last Name:" & lastname & VbCrLf body=body & "Email:" & email & VbCrLf body=body & "Confirm Email:" & confirmemail & VbCrLf body=body & "Message:" & msg & VbCrLf Set mail= Server.CreateObject("CDO.Message") sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(sch & "smtpserver") = "localhost" .Item(sch & "smtpserverport") = 25 .Item(sch & "sendusing") = 2 .Item(sch & "smtpconnectiontimeout") = 60 .update End With mail.From= "USA" mail.To = "me@domain.com" mail.HTMLBody = body mail.Send Response.Write("Thank you" & firstName & " " & lastName & "for submitting the form." & VbCrLf &"We will contact you at" & email & "or" & contact &".") Set mail= nothing %> </body> </html> Code (markup): Also, Iam not sure what to put in here(Iam a newbie to asp): .Item(sch & "smtpserver") = "localhost" Plz help..
In .Item(sch & "smtpserver") = "localhost" the "localhost" should be replaces by the SMTP server of your web host. This normally takes the form of mail.yourhostsname.com but you need to check your hosts FAQs or contact their support to find the actual name. Also if you host required authenication on their SMTP server you will need to add in your SMTP username and password. Again here you should check with your webhost. Cheers.
Thnx . I was just about to post the same thing..I resolved it..and you are right..this was the problem
You need to know the smtp server of the email server you use. for example for yahoo you should use: smtp.mail.yahoo.com (port 25) smtp.gmail.com (port 465) You can also use the SMTP mail server address provided by your local ISP. It usually is pretty same like the domain you use plus smtp ahead i.e. smtp.domain.com Regards
WOW how quick you were .. it took me only one minute to type that and meanwhile you have resolved the problem. Alright i am glad to got it solved. Cheers
ha ha..I solved it first, then posted it. And no it didn't took me a minute, It actually took me quite a few hours. I posted this problem yesterday
post #2 - Jhar: Today, 5:36 pm post #3 - akinak: Today, 5:38 pm post #4 - yugolancer: Today, 5:39 pm This what i am talking about lol However i am glad to hear that you have sorted the problem out.