469,289 Members | 2,330 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

Using External SMTP Server Vs. IIS SMTP Server

Hi Gang

Our network administrator does not want to install the IIS SMTP server on
our intranet. He wants me to use our existing SMTP server
"mail.smpi.siemens.ca". Can I do this with IIS?? Is this a setting in an
ASP if I'm not running the IIS SMTP server?

We are running on Windows 2000 SP4 with IIS5.

Thanks
Andy
Jul 19 '05 #1
11 3223
CDO has the ability to specify the server, CDONTS does not.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Hi Gang

Our network administrator does not want to install the IIS SMTP server on
our intranet. He wants me to use our existing SMTP server
"mail.smpi.siemens.ca". Can I do this with IIS?? Is this a setting in an
ASP if I'm not running the IIS SMTP server?

We are running on Windows 2000 SP4 with IIS5.

Thanks
Andy

Jul 19 '05 #2
> our intranet. He wants me to use our existing SMTP server
"mail.smpi.siemens.ca". Can I do this with IIS?


Do you mean in ASP? That depends, what mail component are you using?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #3
Hi Aaron

Well... we just found out today that our CDONTS does not work in IIS 5 so
I'm trying to convert my code to CDOSYS (with no clue as to what I'm doing).

So if I have the following code, which works fine with CDONTS... how do I
get it to CDOSYS pointing to the external SMTP server
"mail.smpi.siemens.ca"?

Dim mail
Set mail=CreateObject("CDONTS.NewMail")
mail.From = Session("Email")
mail.To = "an***********@siemens.com"
mail.Subject = "Employee Expense Report"
mail.Body = "The body text goes here."
mail.Send
Set mail = Nothing

Please help
Andy
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
our intranet. He wants me to use our existing SMTP server
"mail.smpi.siemens.ca". Can I do this with IIS?


Do you mean in ASP? That depends, what mail component are you using?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #4
http://www.aspfaq.com/2339

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Hi Aaron

Well... we just found out today that our CDONTS does not work in IIS 5 so
I'm trying to convert my code to CDOSYS (with no clue as to what I'm doing).
So if I have the following code, which works fine with CDONTS... how do I
get it to CDOSYS pointing to the external SMTP server
"mail.smpi.siemens.ca"?

Dim mail
Set mail=CreateObject("CDONTS.NewMail")
mail.From = Session("Email")
mail.To = "an***********@siemens.com"
mail.Subject = "Employee Expense Report"
mail.Body = "The body text goes here."
mail.Send
Set mail = Nothing

Please help
Andy
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
our intranet. He wants me to use our existing SMTP server
"mail.smpi.siemens.ca". Can I do this with IIS?


Do you mean in ASP? That depends, what mail component are you using?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


Jul 19 '05 #5
Aaron

Here's my code. When I run it I get the error:

"Item cannot be found in the collection corresponding to the requested name
or ordinal.
/WebApps/Expenses/testemail.asp, line 5"

This points to the line ".Item(cdoSendUsingMethod) = cdoSendUsingPort" in
the code.

Any ideas??
<%
Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.smpi.siemens.ca"
.Update
End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "an***********@siemens.com"
.To = "an***********@siemens.com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing

%>

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uz****************@TK2MSFTNGP09.phx.gbl...
http://www.aspfaq.com/2339

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Hi Aaron

Well... we just found out today that our CDONTS does not work in IIS 5 so I'm trying to convert my code to CDOSYS (with no clue as to what I'm

doing).

So if I have the following code, which works fine with CDONTS... how do I get it to CDOSYS pointing to the external SMTP server
"mail.smpi.siemens.ca"?

Dim mail
Set mail=CreateObject("CDONTS.NewMail")
mail.From = Session("Email")
mail.To = "an***********@siemens.com"
mail.Subject = "Employee Expense Report"
mail.Body = "The body text goes here."
mail.Send
Set mail = Nothing

Please help
Andy
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
> our intranet. He wants me to use our existing SMTP server
> "mail.smpi.siemens.ca". Can I do this with IIS?

Do you mean in ASP? That depends, what mail component are you using?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/



Jul 19 '05 #6
You forgot the metadata tag. Check out the WHOLE code sample.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Aaron

Here's my code. When I run it I get the error:

"Item cannot be found in the collection corresponding to the requested name or ordinal.
/WebApps/Expenses/testemail.asp, line 5"

This points to the line ".Item(cdoSendUsingMethod) = cdoSendUsingPort" in
the code.

Any ideas??
<%
Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.smpi.siemens.ca"
.Update
End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "an***********@siemens.com"
.To = "an***********@siemens.com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing

%>

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uz****************@TK2MSFTNGP09.phx.gbl...
http://www.aspfaq.com/2339

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Hi Aaron

Well... we just found out today that our CDONTS does not work in IIS 5 so I'm trying to convert my code to CDOSYS (with no clue as to what I'm doing).

So if I have the following code, which works fine with CDONTS... how do I
get it to CDOSYS pointing to the external SMTP server
"mail.smpi.siemens.ca"?

Dim mail
Set mail=CreateObject("CDONTS.NewMail")
mail.From = Session("Email")
mail.To = "an***********@siemens.com"
mail.Subject = "Employee Expense Report"
mail.Body = "The body text goes here."
mail.Send
Set mail = Nothing

Please help
Andy
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
> > our intranet. He wants me to use our existing SMTP server
> > "mail.smpi.siemens.ca". Can I do this with IIS?
>
> Do you mean in ASP? That depends, what mail component are you

using? >
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>



Jul 19 '05 #7
Aaron

Sorry, my stupidity. I didn't realize that the metadata tag would actually
do anything. It works great now!!!! Many, many thanks.

Best Regards,
Andy
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:e7*************@tk2msftngp13.phx.gbl...
You forgot the metadata tag. Check out the WHOLE code sample.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Aaron

Here's my code. When I run it I get the error:

"Item cannot be found in the collection corresponding to the requested

name
or ordinal.
/WebApps/Expenses/testemail.asp, line 5"

This points to the line ".Item(cdoSendUsingMethod) = cdoSendUsingPort" in
the code.

Any ideas??
<%
Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.smpi.siemens.ca"
.Update
End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "an***********@siemens.com"
.To = "an***********@siemens.com"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing

%>

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uz****************@TK2MSFTNGP09.phx.gbl...
http://www.aspfaq.com/2339

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
> Hi Aaron
>
> Well... we just found out today that our CDONTS does not work in IIS
5 so
> I'm trying to convert my code to CDOSYS (with no clue as to what I'm
doing).
>
> So if I have the following code, which works fine with CDONTS... how

do
I
> get it to CDOSYS pointing to the external SMTP server
> "mail.smpi.siemens.ca"?
>
> Dim mail
> Set mail=CreateObject("CDONTS.NewMail")
> mail.From = Session("Email")
> mail.To = "an***********@siemens.com"
> mail.Subject = "Employee Expense Report"
> mail.Body = "The body text goes here."
> mail.Send
> Set mail = Nothing
>
> Please help
> Andy
>
>
> "Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
> news:%2***************@TK2MSFTNGP09.phx.gbl...
> > > our intranet. He wants me to use our existing SMTP server
> > > "mail.smpi.siemens.ca". Can I do this with IIS?
> >
> > Do you mean in ASP? That depends, what mail component are you

using? > >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > http://www.aspfaq.com/
> >
> >
>
>



Jul 19 '05 #8
CJM
Aaron,

Out of interest, I tried your example, but I got a different error:

(0x8004020F)
The event class for this subscription is in an invalid partition
/fxdb/cdo.asp, line 30

Line 30 calls the .Send method

Any thoughts?

[XP/IIS5.1 machine]

Chris

Any thoughts
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uz****************@TK2MSFTNGP09.phx.gbl...
http://www.aspfaq.com/2339

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Andy" <an***********@siemens-nospam.com> wrote in message
news:10***************@pbht107x.smpi.siemens.ca...
Hi Aaron

Well... we just found out today that our CDONTS does not work in IIS 5 so I'm trying to convert my code to CDOSYS (with no clue as to what I'm

doing).

So if I have the following code, which works fine with CDONTS... how do I get it to CDOSYS pointing to the external SMTP server
"mail.smpi.siemens.ca"?

Dim mail
Set mail=CreateObject("CDONTS.NewMail")
mail.From = Session("Email")
mail.To = "an***********@siemens.com"
mail.Subject = "Employee Expense Report"
mail.Body = "The body text goes here."
mail.Send
Set mail = Nothing

Please help
Andy
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
> our intranet. He wants me to use our existing SMTP server
> "mail.smpi.siemens.ca". Can I do this with IIS?

Do you mean in ASP? That depends, what mail component are you using?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/



Jul 19 '05 #9
http://www.aspfaq.com/2305

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"CJM" <cj*****@yahoo.co.uk> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
Aaron,

Out of interest, I tried your example, but I got a different error:

(0x8004020F)
The event class for this subscription is in an invalid partition
/fxdb/cdo.asp, line 30

Line 30 calls the .Send method

Any thoughts?

Jul 19 '05 #10
CJM
Aaron,

The problem is with my smtp server (ie. on WinXP/IIS5.1).

I've tried the code with another (proper!) smtp server on the domain which
I've used with 3rd party components and your example script works fine.

I've never used the XP/IIS smtp server before, and I dont even know if it is
'full' server. Any good sources for swotting that you know about?

cheers

Chris
Jul 19 '05 #11
Yes, use a dedicated SMTP server instead of scattering the task across a
bunch of IIS homegrown things...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"CJM" <cj*****@yahoo.co.uk> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
Aaron,

The problem is with my smtp server (ie. on WinXP/IIS5.1).

I've tried the code with another (proper!) smtp server on the domain which
I've used with 3rd party components and your example script works fine.

I've never used the XP/IIS smtp server before, and I dont even know if it is 'full' server. Any good sources for swotting that you know about?

cheers

Chris

Jul 19 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by James | last post: by
1 post views Thread by Jayakumar | last post: by
14 posts views Thread by sridhar | last post: by
7 posts views Thread by oopsbabies | last post: by
8 posts views Thread by _spitFIRE | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.