Board index » delphi » E-mail attachment from app

E-mail attachment from app

I need to e-mail a file from within my app.
I need to use the default mail client.
First connect then send a file

I can use
Var
Command:String;
Begin
Command:='Mailto:m...@there.com?subject=test'
Shellexecute(.....

End;
This launches Outlook express or the default e-mail client
but I cant attach the file in code.

I tried fastnet nnmstmp but can't get it to work.
It won't bring up the connection to dial & if I launch it manually
although it says it sent the message they never seem to arrive
(It did work once but the message arrived next day. I suspect it was
re-routed)

Anyone got any suggestions or free/cheap components.
This is now a desperate situation!
T.I.A.

 

Re:E-mail attachment from app


hi,

on Thu, 11 Jan 2001 18:52:12 +0000, "Nick <h...@dial.pipex.com>" wrote
in <3A5E00DC.4...@dial.pipex.com>:

Quote
> I need to e-mail a file from within my app.
> I need to use the default mail client.
> First connect then send a file

> I can use
> Var
> Command:String;
> Begin
> Command:='Mailto:m...@there.com?subject=test'
> Shellexecute(.....

[..]

you can't use shellexecute to send an email attachement.
you will have to use mapi instead.

cu chris
--
Visit http://yazno.tripod.com/ieinstver/ , home of IEInstVer.
IEInstVer - The "IE Availability, Version & Information" Component.

Re:E-mail attachment from app


Quote
Christian Bergmann wrote:
> > I need to e-mail a file from within my app.
> > I need to use the default mail client.
> > First connect then send a file

> > I can use
> > Var
> > Command:String;
> > Begin
> > Command:='Mailto:m...@there.com?subject=test'
> > Shellexecute(.....
> [..]
> you can't use shellexecute to send an email attachement.
> you will have to use mapi instead.

you can use a nice MAPI wrapper:
TEmail: MAPI component (V2.10.0)
by Danny Heijl and Stefan Hoffmeister
I'm offline now, so I cannot check if it is correct, but try there:
http://www.cevi.be/pp/danny/dhe.htm
If not, search for temail2.zip in DSP :)

--
misiek

***  IRC: nbrasil  ICQ UIN: 3620591         | Michal R. Hoffmann ***
***  <mailto:mis...@knm.org.pl>             | PO Box 41          ***
***  http://www.kki.net.pl/mis              | 71-119 Szczecin 35 ***
***    -= member of: KNM, ZUKiH, HCKU =-    | POLAND             ***
----  eby ekstrapolowa? trzeba by? ekstra-my?liwym (c)/M. Kruk ----

Other Threads