Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Mail Configuration
 Can't get CDO email validation to work

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
kerryww Posted - 10 January 2013 : 18:57:23
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
%>
3   L A T E S T    R E P L I E S    (Newest First)
Podge Posted - 12 January 2013 : 08:44:36
Glad you got it working.
kerryww Posted - 11 January 2013 : 22:24:04
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
Podge Posted - 11 January 2013 : 06:36:26
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?

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.07