Writing into the Pickup directory

This is a discussion on Writing into the Pickup directory within the Inetserver forums in Microsoft Tools category; Hi, I created an ASP page for sending email messages. I'd like to write these messages directly into the C:\Inetpub\mailroot\Pickup directory. The problem is that when the IIS SMTP is active writing is not possible... How can I do? Thank you very much in advance Carmelo...

Go Back   Application Development Forum > Microsoft Tools > Inetserver

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-03-2008, 09:36 AM
carmelo
Guest
 
Default Writing into the Pickup directory

Hi,
I created an ASP page for sending email messages. I'd like to write
these messages directly into the C:\Inetpub\mailroot\Pickup directory.
The problem is that when the IIS SMTP is active writing is not
possible... How can I do?

Thank you very much in advance
Carmelo
Reply With Quote
  #2  
Old 07-04-2008, 05:17 AM
Chris M
Guest
 
Default Re: Writing into the Pickup directory

carmelo wrote:
> Hi,
> I created an ASP page for sending email messages. I'd like to write
> these messages directly into the C:\Inetpub\mailroot\Pickup directory.
> The problem is that when the IIS SMTP is active writing is not
> possible... How can I do?


It would be much easier to use an external object to build and send the
email, using 'localhost' as the SMTP server.


--
Chris M.

Remove pants to email me.
Reply With Quote
  #3  
Old 07-04-2008, 05:52 AM
Anthony Jones
Guest
 
Default Re: Writing into the Pickup directory

"carmelo" <csaffi@tiscali.it> wrote in message
news:7b23d772-c701-43e5-91ee-eec168274daa@l42g2000hsc.googlegroups.com...
> Hi,
> I created an ASP page for sending email messages. I'd like to write
> these messages directly into the C:\Inetpub\mailroot\Pickup directory.
> The problem is that when the IIS SMTP is active writing is not
> possible... How can I do?
>


"not possible" how is that? When the SMTP is not active it is possible?

Are you trying it like this:-

Const cdoSendUsingMethod =
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSMTPServer =
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPickupDirectory =
"http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory"
Const cdoSMTPServerPort =
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"

Const cdoSendUsingPickup = 1
Const cdoSendUsingPort = 2

Dim oMsg : Set oMsg = CreateObject("CDO.Message")
Dim oConfig : Set oConfig = CreateObject("CDO.Configuration")

With oConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPickup
.Item(cdoSMTPServerPickupDirectory ) = "C:\Inetpub\mailroot\Pickup"
.Update
End With

oMsg.From = "Me <me@mymail.myserver.com>"
oMsg.To = "Bloke <bloke@somewere.com>"
oMsg.Subject = "Test"
oMsg.HTMLBody = "<html><body>Hello World</body></html>"
Set oMsg.Configuration = oConfig

oMsg.Send


--
Anthony Jones - MVP ASP/ASP.NET


Reply With Quote
  #4  
Old 07-04-2008, 09:44 AM
Ken Schaefer
Guest
 
Default Re: Writing into the Pickup directory

You can definately write files into the pickup directory - that's what
CDONTS used to do.

How are you trying to do this, and what is the error you are experiencing?

Cheers
Ken


"carmelo" <csaffi@tiscali.it> wrote in message
news:7b23d772-c701-43e5-91ee-eec168274daa@l42g2000hsc.googlegroups.com...
> Hi,
> I created an ASP page for sending email messages. I'd like to write
> these messages directly into the C:\Inetpub\mailroot\Pickup directory.
> The problem is that when the IIS SMTP is active writing is not
> possible... How can I do?
>
> Thank you very much in advance
> Carmelo


Reply With Quote
  #5  
Old 07-04-2008, 11:11 AM
carmelo
Guest
 
Default Re: Writing into the Pickup directory

I discovered that the problem is not due to the fact that it is not
possible to write into the Pickup directory when IIS is active.
In fact, using a form created on an html page for sending data, the
ASP page (which has to write into the Pickup directory) works
properly... Then I think that the problem is due to the program that
sends data.
The process is this: a client program sends data (using post) to an
ASP page, on server side this ASP page has to write a text file into
the Pickup directory.

The program is written using C++Builder and the Indy library, the code
I used is this:
Il codice che ho utilizzato è il seguente:

TIdMultiPartFormDataStream *data = new TIdMultiPartFormDataStream;
try
{
data->AddFormField("destinatario",IdMessage1->Recipients-
>EMailAddresses);

data->AddFormField("mittente",IdMessage1->From->Address);
data->AddFormField("oggetto",IdMessage1->Subject);
data->AddFormField("messaggio",IdMessage1->Body->Text);
risp = IdHTTP1->Post(url,data);
}
__finally
{
delete data;
}


The ASP page read data using this code:
receiver=Request.Form("receiver")
message=Request.Form("message")
sender=Request.Form("sender")
subject=Request.Form("subject")


I hope you can help me
Thank you very much again
Reply With Quote
  #6  
Old 07-05-2008, 03:52 AM
Anthony Jones
Guest
 
Default Re: Writing into the Pickup directory


"carmelo" <csaffi@tiscali.it> wrote in message
news:e85313ee-e56f-4336-817a-3fc7079faa6c@59g2000hsb.googlegroups.com...

>The program is written using C++Builder and the Indy library,


Don't know what that is. Why not use CDOSYS as in example posted earlier?


--
Anthony Jones - MVP ASP/ASP.NET


Reply With Quote
  #7  
Old 07-05-2008, 04:37 AM
carmelo
Guest
 
Default Re: Writing into the Pickup directory

> Don't know what that is. *Why not use CDOSYS as in example posted earlier?
>


I'd like to write directly into the Pickup directory, without using
CDOSYS, because I need to send really many request to the ASP page and
because I need a fast response. But the problem is not about using
CDOSYS or FileSystemObject, in fact, as I said on previous post, I
discovered that the problem is not about writing into the Pickup
directory, the problem is sending data to the ASP page.
Reply With Quote
  #8  
Old 07-05-2008, 05:49 AM
carmelo
Guest
 
Default Re: Writing into the Pickup directory

Doing other tests, using a PHP page I discovered that data are
correctly received, then the problem should be on the ASP page...

The PHP code is this:
$destinatario= $_POST['destinatario'];
$messaggio= $_POST['messaggio'];
$mittente= $_POST['mittente'];
$oggetto= $_POST['oggetto'];

The ASP code is this:
destinatario=Request.Form("destinatario")
messaggio=Request.Form("messaggio")
mittente=Request.Form("mittente")
oggetto=Request.Form("oggetto")


How can I fix the ASP page to make it work?

Thank you for your help
Reply With Quote
  #9  
Old 07-05-2008, 07:38 AM
Anthony Jones
Guest
 
Default Re: Writing into the Pickup directory

"carmelo" <csaffi@tiscali.it> wrote in message
news:1ef010e7-ff50-4e5b-ba63-1015a9bf6e58@k37g2000hsf.googlegroups.com...
> Doing other tests, using a PHP page I discovered that data are
> correctly received, then the problem should be on the ASP page...
>
> The PHP code is this:
> $destinatario= $_POST['destinatario'];
> $messaggio= $_POST['messaggio'];
> $mittente= $_POST['mittente'];
> $oggetto= $_POST['oggetto'];
>
> The ASP code is this:
> destinatario=Request.Form("destinatario")
> messaggio=Request.Form("messaggio")
> mittente=Request.Form("mittente")
> oggetto=Request.Form("oggetto")
>
>


Try it like this:-

destinatario=Request.Form("destinatario").Item
messaggio=Request.Form("messaggio").Item
mittente=Request.Form("mittente").Item
oggetto=Request.Form("oggetto").Item

The .Form property in ASP returns an implementaion of IStringList.
IStringList in turn has an Item property which is the default. In
VBScript your code should work fine but in JScript (I'm not able to
determine which you are using from the code you've posted) the variables
would hold a reference to IStringList instead of just a string.

If you are using VBScript is not easy to see how the values make in to your
C++ code. Are you sure the strings are being retreived from the variants
correctly?


--
Anthony Jones - MVP ASP/ASP.NET


Reply With Quote
  #10  
Old 07-05-2008, 07:40 AM
Anthony Jones
Guest
 
Default Re: Writing into the Pickup directory

"carmelo" <csaffi@tiscali.it> wrote in message
news:6b5499fe-018b-4e1d-9ae3-10766cbc8164@b1g2000hsg.googlegroups.com...
> Don't know what that is. Why not use CDOSYS as in example posted earlier?
>
>>>>

I'd like to write directly into the Pickup directory, without using
CDOSYS, because I need to send really many request to the ASP page and
because I need a fast response. But the problem is not about using
CDOSYS or FileSystemObject, in fact, as I said on previous post, I
discovered that the problem is not about writing into the Pickup
directory, the problem is sending data to the ASP page.
<<<<

You've measured CDOSYS and deterimined that it isn't fast enought and the
C++ component you are using is?


--
Anthony Jones - MVP ASP/ASP.NET


Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:52 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.