473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem sending mail (CDOSYS)

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 = "<to@x.com>" 'Enter a valid email address.
.From = "<fr**@x.com>" '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

Jul 19 '05 #1
3 5846
It may be permission related. If the user that IIS is running under doesn't
have access to the folder that SMTP drops into it may give you an erroneous
error.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Serge Myrand" <in**@softdelirium.qc.ca> wrote in message
news:41**************@softdelirium.qc.ca...
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 = "<to@x.com>" 'Enter a valid email address.
.From = "<fr**@x.com>" '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

Jul 19 '05 #2
Hi,

The user has admin rights and the directory is shared (LAN and WEB). Is the
'pickup' directory must be mention in the .ASP file or SMPT use it by default?

thank's
serge

"Curt_C [MVP]" wrote:
It may be permission related. If the user that IIS is running under doesn't
have access to the folder that SMTP drops into it may give you an erroneous
error.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com

"Serge Myrand" <in**@softdelirium.qc.ca> wrote in message
news:41**************@softdelirium.qc.ca...
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 = "<to@x.com>" 'Enter a valid email address.
.From = "<fr**@x.com>" '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


Jul 19 '05 #3
Hi,

Ok, I found the reason why..! This is due to a security modification. Look at
http://www.slipstick.com/files/Q324037.doc
I run XP Pro sp2 and the workaround uusing the PickUp directory works find for
me.
I needed to add :
..item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")
= sPickupPath

hope this help
serge
Serge Myrand wrote:
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 = "<to@x.com>" 'Enter a valid email address.
.From = "<fr**@x.com>" '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


Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Neil Ginsberg | last post by:
I am using VBA/Access to send SMTP mail using CDO. I set a reference to "Microsoft CDO for Windows 2000 Library" (cdosys.dll). Everything works fine, both on my PC and on another PC. However, on...
0
by: martin | last post by:
Hi, I have been using the system.web.mail namespace to send mail in my application and every thing has been working fine. however to today I an unable to send mail from my machine using the...
7
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
26
by: Massimo Zaccarin | last post by:
ok, I know that I have to use the System.Web.Mail.SmtpMail class, but I've read from...
4
by: Roger Withnell | last post by:
I'm sending Russian text in an email generated from the website which displays in the email as ?????????? The website is set to codepage 65001 and the charset to utf-8. Please advise. ...
6
by: Rushwire | last post by:
Does anybody know how to send a meeting request using an ics/vcs (VCalendar) attachment from an asp.net page. I don't want my users to have to double click on the attachment but rather that it is...
8
by: Akbur | last post by:
Dear all, I'm having major issues sending an email from my ASP.NET app. I'm getting a "Could not create 'CDO.Message' object". When I did a search for cdosys.dll in \win_location\system32, I...
2
by: mister-Ed | last post by:
Trying to use cdosys mail, but this is giving me an "no such object" error. the hosting company is not much help, but their list of components offered does include cdosys mail: <form...
6
by: ayush patel | last post by:
Hi everybody, I wrote a windows service and I have to do sme email functionality in it. I used SMTP and added system.web reference to the project. there are no compilation errors as such but...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.