Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Mail Configuration
 Can't get CDO email validation to work
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kerryww
Starting Member

30 Posts

Posted - 10 January 2013 :  18:57:23  Show Profile  Reply with Quote
Hi,

I've recently changed hosts from a MS2003 server to an account with Arvixe.com with a MS2008 server. I uploaded the files and got everything up and running without much trouble - except user email validation. I've tried everything, checked, rechecked and checked again over the last 2 days, but no love.

I have tried code sent to me from Arvixe and the code in SF but nothing works. I looked at every other post on the subject in the forum and tried the suggestions, but nothing works.

Any suggestions much appreciated.

Kerry

Here is my most recent code attempt in inc_mail.asp
case "cdosys"
	        Set iConf = Server.CreateObject ("CDO.Configuration")
        	Set Flds = iConf.Fields 

	        'Set and update fields properties
        	Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'cdoSendUsingPort
                Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mail.orientbeachadultforum.com
                'Flds ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'added by me
	   
                Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
		Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "moderator@orientbeachadultforum.com"
		Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "secret"
        	Flds.Update
                Set objNewMail = Server.CreateObject("CDO.Message")
        	Set objNewMail.Configuration = iConf
                'Format and send message
        	Err.Clear 
     objNewMail.To = strRecipients
		objNewMail.From = strSender
		objNewMail.Subject = strSubject
		objNewMail.TextBody = strMessage
        	On Error Resume Next
		objNewMail.Send
		If Err <> 0 Then 
			Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
		End if



Here is the code Arvixe suggested I use
<%
Set objMail = Server.CreateObject("CDO.Message")
Set objConf = Server.CreateObject("CDO.Configuration")
Set objFields = objConf.Fields

With objFields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.domain.tld"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "emailuser@domain.tld"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.Update
End With

With objMail
Set .Configuration = objConf
.From = "useremail@domain.tld"
.To = "email destination"
.Cc = "other email"
.Subject = "subject of the email"
.TextBody = "body of the text"
End With

Err.Clear
on error resume next

objMail.Send
if len(Err.Description) = 0 then

response.write "Mail sent successfully "
else

response.write "Mail not sent successfully"
response.write err.Description & " "

end if
Set objFields = Nothing
Set objConf = Nothing
Set objMail = Nothing
%>

Podge
Support Moderator

Ireland
3776 Posts

Posted - 11 January 2013 :  06:36:26  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = mail.orientbeachadultforum.com

shoudl be

Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.orientbeachadultforum.com"


Do you get any errors anywhere i.e. in your browser or in the mail server logs?
Can you do a tracert to the email server?
Is there a firewall on your server?

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

kerryww
Starting Member

30 Posts

Posted - 11 January 2013 :  22:24:04  Show Profile  Reply with Quote
Hi Podge,

Thanks for your help. I guessed it was going to be something really simple and it was. "mail.orientbeachadultforum.com" worked.

It's amazing how something is looking you in the eye all day and you miss it completely. Until someone else comes along and picks your mistake instantly. My learning ASP from a book called ASP for Dummies that I borrowed from the library doesn't help either :)

Thanks again,

Kerry
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 12 January 2013 :  08:44:36  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message  Reply with Quote
Glad you got it working.

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000 Version 3.4.07