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/