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
 Help setting up sending mail via exchange
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Zaar
Starting Member

13 Posts

Posted - 10 July 2006 :  17:19:55  Show Profile
Hi all,
I need a little help with setting up sending mail from the forum using my exchange server. The forum is hosted on the same server which is hosting exchange.

I have told in the forum admin tool, that the forum shall use my mail server for sending. (mail.mydomaine.dk)

Now, what do I specify for each of the strings in the inc_mail.asp file, and more importent, why?

---------------------------------------------------------------------

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
---------------------------------------------------------------------

Hope that someone can help me how to set this up, since im pretty much out of ideas my self.

So, thanks in advance

Zaar

Edited by - Zaar on 10 July 2006 17:21:47

Podge
Support Moderator

Ireland
3776 Posts

Posted - 10 July 2006 :  17:54:21  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I take it that email isn't working on your domain?

If so, are there any errors returned or in the Exchange logs ?

Is relaying allowed for local i.p. addresses or must users authenticate before sending email?

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

Zaar
Starting Member

13 Posts

Posted - 11 July 2006 :  01:37:31  Show Profile
Well, I looked in the exchange logs, and nothing unusual there. I cant see the mails even getting through.
The reason that I haven’t started worried to much about Exchange yet, is that I wasn’t even sure I used the right settings in the inc_mail.asp, and I wanted to be sure about those settings before starting trouble shooting on my Exchange server.

About the relaying part, I’m not sure. I will have to get back to you with that after I have looked into it.
Go to Top of Page

Zaar
Starting Member

13 Posts

Posted - 11 July 2006 :  04:14:08  Show Profile
Ok, relaying is now enabled for the local IP adress of the server.
Users do not have to authenticate.

What info do I now enter in the Forum admin field for email server adr? the local server name, which is server.home.local ?, or mail.mydomaine.dk? or a third?

Next, what info do I now enter for each string in the inc_mail.asp file?

Thanks
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 11 July 2006 :  05:43:44  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
If relaying is allowed for local i.p.s then you do not need to edit inc_mail.asp

You should set the mail server address to whatever one works. This could be

server.home.local
mail.mydomaine.dk
localhost
127.0.0.1

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

Zaar
Starting Member

13 Posts

Posted - 11 July 2006 :  09:29:24  Show Profile
With the default inc_mail.asp file I tried all of these settings for mail server:

server.home.local
mail.mydomaine.dk
localhost
127.0.0.1

But, still no go.

My forum is on an internal IP : 192.168.0.5 which I have allowed to relay throug the exchange server which is on the same machine aka. same IP.
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 11 July 2006 :  11:58:41  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Exchange is not necessarily bound to the same i.p. address.

You could try changeing the

On error resume next to

On error goto 0

i.e.
...
snipped
...
On Error Goto 0
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


And see if it raises an error when you try to send an email.

Copy and paste any errors to this thread.

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

Zaar
Starting Member

13 Posts

Posted - 11 July 2006 :  13:20:32  Show Profile
Ok, by doing this, I was able to get this error when I choosed to accept the member pending:

error '80040211'
/forum/inc_mail.asp, line 142

that line is I marked with red in the bellow copy of my code

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 Goto 0
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
Go to Top of Page

Zaar
Starting Member

13 Posts

Posted - 11 July 2006 :  15:24:17  Show Profile
Ok, I finally solved the problem.
The problem wasent with the forum script, but a setting in the IIS.

First, let me paste my working script:
---------------------------------------------------------------------
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") = 1 'cdoSendUsingPort
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "192.168.0.5"
'Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverport")= 25
'Flds("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
'Flds("http://schemas.microsoft.com/cdo/configuration/sendusername") = "x"
'Flds("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "x"
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 Goto 0
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
---------------------------------------------------------------------
-Im not using authentification.

-I have disabled the relay I had set up, since my webserver and my exchange server is the same machine, hence running on the same internal IP which then makes relaying pointles.

-Ok, for the IIS setting if other should happen to have this problem:

Start the IIS manager.
Open your default websites folder.
Take the properties for the default website.
At the new window that popsup, point at "Home Directory".
Application pool: change this setting to -> Exchangeapplicationpool.
Choose for which items you want this to count.
Hit ok.
Restart the site, and you should be able to send mail from your forum.

At least this did it for me.


Go to Top of Page

Eraxxer
Starting Member

18 Posts

Posted - 17 November 2006 :  11:24:10  Show Profile
Hey,
Just wanted to say that I had the same setup as yours and turned on my exchange server services and followed your settings and it worked for me too.

Thanks a lot,

Go to Top of Page

stone5150
Starting Member

36 Posts

Posted - 22 May 2007 :  14:19:34  Show Profile
Any idea if this will mess up OWA?
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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07