Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Thu, 3 Jul 2008 06:36:45 -0700 (PDT),    group: microsoft.public.inetserver.iis        back       


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
date: Thu, 3 Jul 2008 06:36:45 -0700 (PDT)   author:   carmelo

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.
date: Fri, 04 Jul 2008 10:17:42 +0100   author:   Chris M

Re: Writing into the Pickup directory   
"carmelo"  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 "
oMsg.To = "Bloke "
oMsg.Subject = "Test"
oMsg.HTMLBody = "<html><body>Hello World</body></html>"
Set oMsg.Configuration = oConfig

oMsg.Send


-- 
Anthony Jones - MVP ASP/ASP.NET
date: Fri, 4 Jul 2008 10:52:01 +0100   author:   Anthony Jones

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"  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
date: Fri, 4 Jul 2008 23:44:33 +1000   author:   Ken Schaefer

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ꊕ힫 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
date: Fri, 4 Jul 2008 08:11:58 -0700 (PDT)   author:   carmelo

Re: Writing into the Pickup directory   
"carmelo"  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
date: Sat, 5 Jul 2008 08:52:13 +0100   author:   Anthony Jones

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.
date: Sat, 5 Jul 2008 01:37:36 -0700 (PDT)   author:   carmelo

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
date: Sat, 5 Jul 2008 02:49:45 -0700 (PDT)   author:   carmelo

Re: Writing into the Pickup directory   
"carmelo"  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
date: Sat, 5 Jul 2008 12:38:40 +0100   author:   Anthony Jones

Re: Writing into the Pickup directory   
"carmelo"  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
date: Sat, 5 Jul 2008 12:40:21 +0100   author:   Anthony Jones

Re: Writing into the Pickup directory   
I did not specify the language, but the code is VBScript.
I tried using .Item, but it's the same...
The C++ component I'm using is not to avoid CDOSYS, it is to send data
to an ASP page. On server side, the ASP page can use CDOSYS or write
directly into the Pickup directory as I'm doing. I repeat that the
problem is not sending the email message, because it's working, but
it's in receiving data. Using a PHP script it's receiving data, but
the ASP script it's not receiving data...
date: Sat, 5 Jul 2008 07:50:11 -0700 (PDT)   author:   carmelo

Re: Writing into the Pickup directory   
"carmelo"  wrote in message
news:61ce46f0-e8f8-4cc9-9369-7253dfaa4098@8g2000hse.googlegroups.com...
> I did not specify the language, but the code is VBScript.
> I tried using .Item, but it's the same...
> The C++ component I'm using is not to avoid CDOSYS, it is to send data
> to an ASP page. On server side, the ASP page can use CDOSYS or write
> directly into the Pickup directory as I'm doing. I repeat that the
> problem is not sending the email message, because it's working, but
> it's in receiving data. Using a PHP script it's receiving data, but
> the ASP script it's not receiving data...

K the penny has dropped, the C++ code is running client-side.

At a guess I suspect the client side component is not setting the request
content type properly.

The Content-Type header should be set to application/x-www-form-urlencoded


-- 
Anthony Jones - MVP ASP/ASP.NET
date: Sun, 6 Jul 2008 08:35:03 +0100   author:   Anthony Jones

Re: Writing into the Pickup directory   
"Anthony Jones"  wrote in message
news:OipbOpz3IHA.3500@TK2MSFTNGP05.phx.gbl...
> "carmelo"  wrote in message
> news:61ce46f0-e8f8-4cc9-9369-7253dfaa4098@8g2000hse.googlegroups.com...
> > I did not specify the language, but the code is VBScript.
> > I tried using .Item, but it's the same...
> > The C++ component I'm using is not to avoid CDOSYS, it is to send data
> > to an ASP page. On server side, the ASP page can use CDOSYS or write
> > directly into the Pickup directory as I'm doing. I repeat that the
> > problem is not sending the email message, because it's working, but
> > it's in receiving data. Using a PHP script it's receiving data, but
> > the ASP script it's not receiving data...
>
> K the penny has dropped, the C++ code is running client-side.
>
> At a guess I suspect the client side component is not setting the request
> content type properly.
>
> The Content-Type header should be set to application/x-www-form-urlencoded
>
>


I just noticed in the C++ that the component you are using is called
TIdMultiPartFormDataStream.  This would indicate its using the content type
multipart/form-data in order to simulate the sending of a file.  ASP does
not support this content type natively.

-- 
Anthony Jones - MVP ASP/ASP.NET
date: Sun, 6 Jul 2008 08:48:09 +0100   author:   Anthony Jones

Re: Writing into the Pickup directory   
> > K the penny has dropped, the C code is running client-side.
>
> > At a guess I suspect the client side component is not setting the request
> > content type properly.
>
> > The Content-Type header should be set to application/x-www-form-urlencoded
>
> I just noticed in the C that the component you are using is called
> TIdMultiPartFormDataStream.  This would indicate its using the content type
> multipart/form-data in order to simulate the sending of a file.  ASP does
> not support this content type natively.

What do you suggest to avoid this problem?

I hope in your help
Carmelo
date: Mon, 7 Jul 2008 01:00:23 -0700 (PDT)   author:   carmelo

Re: Writing into the Pickup directory   
"carmelo"  wrote in message
news:ae3965c1-b0c2-4c47-8af7-2da48386502e@e53g2000hsa.googlegroups.com...
>> > K the penny has dropped, the C++ code is running client-side.
>>
>> > At a guess I suspect the client side component is not setting the
request
>> > content type properly.
>>
>> > The Content-Type header should be set to
application/x-www-form-urlencoded
>>
>> I just noticed in the C++ that the component you are using is called
>> TIdMultiPartFormDataStream. This would indicate its using the content
type
>> multipart/form-data in order to simulate the sending of a file. ASP does
>> not support this content type natively.
>
>What do you suggest to avoid this problem?
>

Use something that posts with the application/x-www-form-urlencoded content
type instead of multipart/form-data.


-- 
Anthony Jones - MVP ASP/ASP.NET
date: Tue, 8 Jul 2008 10:17:21 +0100   author:   Anthony Jones

Re: Writing into the Pickup directory   
carmelo wrote  on Mon, 7 Jul 2008 01:00:23 -0700 (PDT):

 >>> K the penny has dropped, the C++ code is running client-side.

 >>> At a guess I suspect the client side component is not setting the
 >>> request content type properly.

 >>> The Content-Type header should be set to
 >>> application/x-www-form-urlencoded

 >> I just noticed in the C++ that the component you are using is called
 >> TIdMultiPartFormDataStream.  This would indicate its using the
 >> content type multipart/form-data in order to simulate the sending of
 >> a file.  ASP does not support this content type natively.

> What do you suggest to avoid this problem?

As Anthony suggests you could change the client to use 
application/x-www-form-urlencoded . If you cannot change the client, then 
you could use some code on the server to handle this content type and decode 
it for you. There are various components and scripts that can do this - 
check with the server admin to see if any "upload" components are installed 
(eg ASPUpload) and if you can use one of these, it should allow you to 
access the Form values after decoding. If there are no "upload" components 
installed, and you need a pure code solution, look at 
ttp://www.motobit.com/help/scptutl/pure-asp-upload.htm  - this is a class 
that you can use that is pure ASP, and will do the decoding for you.

-- 
Dan
date: Wed, 9 Jul 2008 16:56:42 +0100   author:   Daniel Crichton

Re: Writing into the Pickup directory   
Ok, now I was able to post data.
But it seems that the message length is limited, so I'm not able to
post long text data...

What do you suggest?


Thank you again
Carmelo
date: Fri, 11 Jul 2008 01:49:05 -0700 (PDT)   author:   carmelo

Re: Writing into the Pickup directory   
"carmelo"  wrote in message
news:53e92966-bf1f-41fb-a18c-8310e61934fa@x35g2000hsb.googlegroups.com...
> Ok, now I was able to post data.
> But it seems that the message length is limited, so I'm not able to
> post long text data...
>
> What do you suggest?

How do you know it limited?
How big is the data you are posting?

The default max entity body on IIS6 is 200K however if your site is hosted
by a third party then it may be different.

-- 
Anthony Jones - MVP ASP/ASP.NET
date: Fri, 11 Jul 2008 16:45:13 +0100   author:   Anthony Jones

Re: Writing into the Pickup directory   
I made some tests and I discovered that the limit was not due to IIS
but to the presence in the message of the "&" character... now that I
handled it, it works...
date: Sat, 12 Jul 2008 01:57:57 -0700 (PDT)   author:   carmelo

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us