473,763 Members | 3,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\mail root\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 cdoSendUsingPor t = 2

set iMsg = CreateObject("C DO.Message")
set iConf = CreateObject("C DO.Configuratio n")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microso ft.com/cdo/configuration/sendusing") =
1 ' local server
.Item("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"http://127.0.0.1"

..Item("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout")
= 10

..Item("http://schemas.microso ft.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.co m>" '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 5873
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**@softdelir ium.qc.ca> wrote in message
news:41******** ******@softdeli rium.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\mail root\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 cdoSendUsingPor t = 2

set iMsg = CreateObject("C DO.Message")
set iConf = CreateObject("C DO.Configuratio n")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microso ft.com/cdo/configuration/sendusing") =
1 ' local server
.Item("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"http://127.0.0.1"

..Item("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout"
) = 10

.Item("http://schemas.microso ft.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.co m>" '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**@softdelir ium.qc.ca> wrote in message
news:41******** ******@softdeli rium.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\mail root\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 cdoSendUsingPor t = 2

set iMsg = CreateObject("C DO.Message")
set iConf = CreateObject("C DO.Configuratio n")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microso ft.com/cdo/configuration/sendusing") =
1 ' local server
.Item("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"http://127.0.0.1"

.Item("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout"
)
= 10

.Item("http://schemas.microso ft.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.co m>" '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.microso ft.com/cdo/configuration/smtpserverpicku pdirectory")
= 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\mail root\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 cdoSendUsingPor t = 2

set iMsg = CreateObject("C DO.Message")
set iConf = CreateObject("C DO.Configuratio n")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microso ft.com/cdo/configuration/sendusing") =
1 ' local server
.Item("http://schemas.microso ft.com/cdo/configuration/smtpserver") =
"http://127.0.0.1"

.Item("http://schemas.microso ft.com/cdo/configuration/smtpconnectiont imeout")
= 10

.Item("http://schemas.microso ft.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.co m>" '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
13433
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 another PC that the database was installed on, the user is getting the message, "The project contains a missing or broken reference to the file 'CDO.DLL' version 1.21." However, I don't have a reference to cdo.dll; my reference is to cdosys.dll....
0
1222
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 methods from this namespace in the usual manner. The error that I get from .net is
7
3521
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 administrator told me to write the emails to the “pickup directory” instead. I know that JMail can do this in ASP, but how do you do this in asp.net? -- --------------------
26
1788
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 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasstopic.asp: Requirements Namespace: System.Web.Mail Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family Assembly: System.Web (in System.Web.dll)
4
5053
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. Posted Via Usenet.com Premium Usenet Newsgroup Services
6
11296
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 simply recognised automatically as a meeting request. The article below shows an example of very close to what I am trying to do. The difference being that I want the email to be sent as a meeting request not as an attached ics file.
8
7547
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 could not find it. So I copied it from another Windows 2003 server, where it did exist. Another dependant file was missing too (inetcomm.dll).
2
5370
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 method="post" action="cdosys-godaddy.asp"><p class="bodymd- wh">Your Name: <input type="text" name="uname" id="uname"> <br>City: <input type="text" name="city" id="city"> <br>State:
6
6519
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 there is a run time error saying System.Web.HttpException: Could not create an object of type 'CDO.Message'. Please verify that the current platform configuration supports SMTP mail. at...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9997
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.