Board index » delphi » Sending Mail with multiple attachments from browser - follow up

Sending Mail with multiple attachments from browser - follow up

Hi

I modified the Indy CGIMailer demo by adding the following code from the
MailClient demo and replacing the second parameter with one relevant to
CGIMailer.

TIdAttachment.Create(IdMessage.MessageParts,slstVarsIn.Values['AFile']);

'AFile' being a <input type = "file"> on the web form.

The problem is it will only send attached files that are on the web server
and not on the local machine (I had previously tested it on W2000Pro with
IIS installed, hence my stating in an earlier post that it was fixed).

And ideas where I'm going wrong

Cheers

Andy Law

 

Re:Sending Mail with multiple attachments from browser - follow up


Quote
> The problem is it will only send attached files that are on the web server
> and not on the local machine (I had previously tested it on W2000Pro with
> IIS installed, hence my stating in an earlier post that it was fixed).

> And ideas where I'm going wrong

Ahem .... your server cannot access the local machine :-)  ..... you have to
have the client send the server the file in question... have a look at
www.matlus.com for code that sends files to servers.

/A.

Re:Sending Mail with multiple attachments from browser - follow up


Quote
> Ahem .... your server cannot access the local machine :-)  ..... you have
to
> have the client send the server the file in question... have a look at
> www.matlus.com for code that sends files to servers.

Allen

I've got a demo from Shiv's site called fileupload.  I don't exactly know
how  it does it but the final outcome is that the file is saved using
TMemoryStream.SaveToFile.

Is there way I can assign the memory stream to the TIdAttachment

Andy

Re:Sending Mail with multiple attachments from browser - follow up


once it saves to file load it as an attachment.

/A.

Quote
> I've got a demo from Shiv's site called fileupload.  I don't exactly know
> how  it does it but the final outcome is that the file is saved using
> TMemoryStream.SaveToFile.

> Is there way I can assign the memory stream to the TIdAttachment

> Andy

Other Threads