S
Serge Myrand
Hi everybody,
The following code for sending email (found on msn I think) works find
when used in a .VBS file. I double click the file and the mail is send.
When I use the same code in my .ASP application I get the following
message:
"The pickup directory path is required and was not specified"
Where to specify that directory?
As stated in the article http://www.aspfaq.com/show.asp?id=2418. I did
'web share' c:\inetpub\mailroot\pickup and got no result. It seems that
sending email using a .VBS file does not use the same ressource as using
a .ASP file even if the component is the same (CDOSYS)! How can'I solve
this problem?
here is the code i use in the .asp file:
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
1 ' local server
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"http://127.0.0.1"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Item("http://schemas.microsoft.com/cdo/configuration/smtpServerPort") =
25
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "<[email protected]>" 'Enter a valid email address.
.From = "<[email protected]>" 'Enter a valid email address.
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = TableData
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
Thank's in advance
serge
The following code for sending email (found on msn I think) works find
when used in a .VBS file. I double click the file and the mail is send.
When I use the same code in my .ASP application I get the following
message:
"The pickup directory path is required and was not specified"
Where to specify that directory?
As stated in the article http://www.aspfaq.com/show.asp?id=2418. I did
'web share' c:\inetpub\mailroot\pickup and got no result. It seems that
sending email using a .VBS file does not use the same ressource as using
a .ASP file even if the component is the same (CDOSYS)! How can'I solve
this problem?
here is the code i use in the .asp file:
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
1 ' local server
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"http://127.0.0.1"
..Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
= 10
..Item("http://schemas.microsoft.com/cdo/configuration/smtpServerPort") =
25
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "<[email protected]>" 'Enter a valid email address.
.From = "<[email protected]>" 'Enter a valid email address.
.Subject = "This is a test CDOSYS message (Sent via Port 25)"
.HTMLBody = TableData
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
Thank's in advance
serge