I use CDONTS when I need to send up send email form on websites. Recently changed my hosting company to godaddy. I realized my send email form gives "permission denied" error. I called GoDaddy support. They told me I should use relay server "relay-hosting.secureserver.net" in my codes. I thought relay server used only with CDO.
How can I include it to my codes? My codes
Set objEmail = Server.CreateObject("CDONTS.NewMail")
objEmail.To = MailTo
objEmail.Cc = MailCc
objEmail.From = MailFrom
objEmail.Subject = MailSubject
objEmail.Body = MailBody
objEmail.Send
Set objEmail = nothing
A web search for "cdonts relay" yielded this example which relates directly to your issue with GoDaddy.com - Based on everything I've read, this only works with CDO.Message
instead of CDONTS.NewMail
.
Set objMail = Server.CreateObject("CDO.Message") objMail.From = MailFrom objMail.To= MailTo objMail.Subject = MailSubject objMail.TextBody = MailBody objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "relay-hosting.secureserver.net" objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objMail.Configuration.Fields.Update objMail.Send set ojbMail = nothing
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.