Here's the code that I have on the site: Set NewMailObj=Server.CreateObject("CDO.Message") Set objConfig = Server.CreateObject("CDO.Configuration") objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587 objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objConfig.Fields.Update Set NewMailObj.Configuration = objConfig NewMailObj.From = "Contact_Us@domain.com.my" NewMailObj.To = "info@domain.com.my" NewMailObj.Subject = "Enquiry from "& sname NewMailObj.TextBody = "NAME: " & sname & vbCrLF & vbCrLF & "Subject: " & subject & vbCrLF & vbCrLF & "Email: " & email & vbCrLF & vbCrLF & "Message: " & vbCrLF & Message 'NewMailObj.Send on error resume next NewMailObj.Send if Err.Number <> 0 then response.Write "Email send failed: " & Err.Description & ".<br />"&vbcrlf end if Code (markup): The thing is, my company is using google apps to host our webmail service. But our web-hosting server has it's own webmail as well. When this code is activated, the system seem to search for the recipient email in the web-host server instead of sending it to out google mail app account, which returns a 550 user not found error. Can someone tell me what I need to do to get it to send the email to our google mail app account instead of the web-hosting server?
Try this code: objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "account@gmail.com" objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "gmail password" objConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl") =1 objConfig.Fields.Update Set NewMailObj.Configuration = objConfig NewMailObj.From = "Contact_Us@domain.com.my" NewMailObj.To = "info@domain.com.my" ............................... Code (markup): Regards. Slawek