| Author |
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
| |
| Curt_C [MVP] 2004-05-30, 11:53 am |
| 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" <andy.mcvicker@siemens-nospam.com> wrote in message
news:1085594632.854484@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
>
>
| |
| Aaron Bertrand - MVP 2004-05-30, 11:53 am |
| > 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/
| |
|
| 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 = "andy.mcvicker@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" <aaron@TRASHaspfaq.com> wrote in message
news:%23a4xxz0QEHA.540@TK2MSFTNGP09.phx.gbl...
>
> Do you mean in ASP? That depends, what mail component are you using?
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
| |
| Aaron Bertrand - MVP 2004-05-30, 11:53 am |
| http://www.aspfaq.com/2339
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Andy" <andy.mcvicker@siemens-nospam.com> wrote in message
news:1085600661.113249@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 = "andy.mcvicker@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" <aaron@TRASHaspfaq.com> wrote in message
> news:%23a4xxz0QEHA.540@TK2MSFTNGP09.phx.gbl...
>
>
| |
|
| 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 = "andy.mcvicker@siemens.com"
.To = "andy.mcvicker@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" <aaron@TRASHaspfaq.com> wrote in message
news:uz%23nb31QEHA.1392@TK2MSFTNGP09.phx.gbl...
> http://www.aspfaq.com/2339
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
>
>
> "Andy" <andy.mcvicker@siemens-nospam.com> wrote in message
> news:1085600661.113249@pbht107x.smpi.siemens.ca...
so[vbcol=seagreen]
> doing).
I[vbcol=seagreen]
>
>
| |
| Aaron Bertrand - MVP 2004-05-30, 11:53 am |
| You forgot the metadata tag. Check out the WHOLE code sample.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Andy" <andy.mcvicker@siemens-nospam.com> wrote in message
news:1085603735.951480@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 = "andy.mcvicker@siemens.com"
> .To = "andy.mcvicker@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" <aaron@TRASHaspfaq.com> wrote in message
> news:uz%23nb31QEHA.1392@TK2MSFTNGP09.phx.gbl...
> so
do[vbcol=seagreen]
> I
using?[vbcol=seagreen]
>
>
| |
|
| 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" <aaron@TRASHaspfaq.com> wrote in message
news:e79gFG2QEHA.644@tk2msftngp13.phx.gbl...
> You forgot the metadata tag. Check out the WHOLE code sample.
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
>
>
> "Andy" <andy.mcvicker@siemens-nospam.com> wrote in message
> news:1085603735.951480@pbht107x.smpi.siemens.ca...
> name
in[vbcol=seagreen]
5[vbcol=seagreen]
> do
> using?
>
>
| |
|
| 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" <aaron@TRASHaspfaq.com> wrote in message
news:uz%23nb31QEHA.1392@TK2MSFTNGP09.phx.gbl...
> http://www.aspfaq.com/2339
>
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
>
>
> "Andy" <andy.mcvicker@siemens-nospam.com> wrote in message
> news:1085600661.113249@pbht107x.smpi.siemens.ca...
so[vbcol=seagreen]
> doing).
I[vbcol=seagreen]
>
>
| |
| Aaron Bertrand - MVP 2004-05-30, 11:53 am |
| http://www.aspfaq.com/2305
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"CJM" <cjmwork@yahoo.co.uk> wrote in message
news:OO2Q4$#QEHA.3016@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?
| |
|
| 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
| |
| Aaron Bertrand - MVP 2004-05-30, 11:54 am |
| 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" <cjmwork@yahoo.co.uk> wrote in message
news:eRPT7dAREHA.3452@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
>
>
|
|
|
|