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
 Email setup using seperate SMTP server
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

bitstreammedia
Starting Member

USA
6 Posts

Posted - 23 July 2009 :  20:46:44  Show Profile
I'm currently running seperate pc's for my webserver and mail server. Is there a way I can setup the forum software to use the email account on my seperate email server to send messages? I only have the CDOSYS option in the email component and no pop or smtp services installed on the webserver. For the email server address, I'm using the ip address of the email server rather than the domain name for it. However, I don't see any attempt of it to log in to the mail server. Does this need to be an actual URL e.g. mail.xxxx.com?

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 23 July 2009 :  21:03:47  Show Profile
in the inc_mail.asp file, there is section that looks like this:

	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") = strMailServer
		'Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
		'Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
		'Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
        	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
you just need to edit the file, and uncomment (remove the ' from in front of the line) the 3 lines that start with Flds and then change username & password to the username/password you use to login to the SMTP server you specify in the Mail Configuration. Using the IP address should be fine.
Go to Top of Page

bitstreammedia
Starting Member

USA
6 Posts

Posted - 25 July 2009 :  11:25:44  Show Profile
I finally was able to get my outgoing email to authenticate and now working. I had to add three new lines to the code and change one above to make it work and just wanted to pass it along in case someone else was having the same issue. Just removing the remarks above didn't make the cdosys authenticate against my mail server.

Here is how the same section looks now and it works like a charm.

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") = strMailServer
Flds("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Flds("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "username"
Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
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

Obviously you need to change the username and password entries to your account settings.

Thanks for the help!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 25 July 2009 :  11:30:58  Show Profile  Visit HuwR's Homepage
that's strange, since smtpusessl is false by default and smtpserverport is 25 by default so theoretically shouldn't need to be set, but glad you got it sorted anyway
Go to Top of Page

bitstreammedia
Starting Member

USA
6 Posts

Posted - 25 July 2009 :  12:21:27  Show Profile
Strange it is, but it seemed to work. Just one of those odd things.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07