Author |
Topic  |
|
Zaar
Starting Member
13 Posts |
Posted - 10 July 2006 : 17:19:55
|
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 |
|
Zaar
Starting Member
13 Posts |
Posted - 11 July 2006 : 01:37:31
|
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.
|
 |
|
Zaar
Starting Member
13 Posts |
Posted - 11 July 2006 : 04:14:08
|
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 |
 |
|
Podge
Support Moderator
    
Ireland
3776 Posts |
|
Zaar
Starting Member
13 Posts |
Posted - 11 July 2006 : 09:29:24
|
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. |
 |
|
Podge
Support Moderator
    
Ireland
3776 Posts |
|
Zaar
Starting Member
13 Posts |
|
Zaar
Starting Member
13 Posts |
Posted - 11 July 2006 : 15:24:17
|
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.
|
 |
|
Eraxxer
Starting Member
18 Posts |
Posted - 17 November 2006 : 11:24:10
|
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,
 |
 |
|
stone5150
Starting Member
36 Posts |
Posted - 22 May 2007 : 14:19:34
|
Any idea if this will mess up OWA? |
 |
|
|
Topic  |
|