| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| |||
| |||
| 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. |
|
#3
| |||
| |||
| "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 |
|
#4
| |||
| |||
| 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 |
|
#5
| |||
| |||
| 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 |
|
#6
| |||
| |||
| "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 |
|
#7
| |||
| |||
| > 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. |
|
#8
| |||
| |||
| 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 |
|
#9
| |||
| |||
| "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 |
|
#10
| |||
| |||
| "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 |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.