I recently changed hosting companies, and now I have a problem with all the mail forms on my websites.
In the past, my old hosting service used Persits, but my new service uses MailEnable so I have to convert all the code. This seemed a simple enough task initially, but it's proved to be a bit of a nightmare that I've spent more than too much time trying to get my head around. My hosting service also tells me I have to enable SMTP authentication in my mail scripts, but I've found no real information on the MailEnable site telling me how I go about doing this.
The code I've got, which at present gives me an internal server error, is:
dim oMail2, email, listName, strMail2
listName=request.form("name")
email=request.form("email")
strMail2 = "This is to confirm that your details have been added to our database to enable you to receive updates." & vbcrlf & vbcrlf
strMail2 = strMail2 & "Yours sincerely" & vbcrlf
strMail2 = strMail2 & "The Secretary" & vbcrlf
set oMail2 = Server.CreateObject("MEMail.Message")
oMail2.Server = "mail.domain.com"
oMail2.MailFrom = "[SMTP:info@domain.com]"
oMail2.MailFromDisplayName = "Domain Name"
oMail2.ContentType = "text/html;"
oMail2.MailTo = "[SMTP:" & email & "]"
oMail2.MailToDisplayName = listName
oMail2.Subject = "Mailing List"
oMail2.MessageBody = strMail2
oMail2.SendMessage
set oMail2 = Nothing
I'm really hoping that someone can give me some pointers about what I'm doing wrong so I can put this problem to bed. I haven't really been doing coding for about 10 years now, and I only maintain this site as a favor to the site owner, so I don't really want to spend more time than I have to trying to get it sorted out.
Thanks in advance to anyone that can supply a solution.
David