Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Problem sending mail (CDOSYS)

Reply
Thread Tools

Problem sending mail (CDOSYS)

 
 
Serge Myrand
Guest
Posts: n/a
 
      08-09-2004
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 = "<(E-Mail Removed)>" 'Enter a valid email address.
.From = "<(E-Mail Removed)>" '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

 
Reply With Quote
 
 
 
 
Serge Myrand
Guest
Posts: n/a
 
      08-09-2004
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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 = "<(E-Mail Removed)>" 'Enter a valid email address.
> > .From = "<(E-Mail Removed)>" '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
> >


 
Reply With Quote
 
 
 
 
Serge Myrand
Guest
Posts: n/a
 
      08-09-2004
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 = "<(E-Mail Removed)>" 'Enter a valid email address.
> .From = "<(E-Mail Removed)>" '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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Failure Sending Mail" when using System.Net.Mail and ASP.Net 2.0 HoustonComputerGuy@gmail.com ASP .Net 4 09-28-2007 03:57 PM
problem sending mail: Sending the email to the following server failed Luke Java 2 03-15-2007 10:54 AM
pls help me when i sent mail, it vil sending twice instead of once ,am using java.mail,am sending my code.... shailajabtech@gmail.com Java 0 09-28-2006 06:38 AM
Sending Mail via System.Net.Mail problem =?Utf-8?B?T3Bh?= ASP .Net 3 01-31-2006 06:44 PM
problem sending mail from netscape mail blacjac Computer Support 2 01-31-2004 06:45 AM



Advertisments