how to send mail by usind ShellExecute?

Please HELP me!
1. All I know are : e-mail(name@usa.net)
and my file to send : c:\myfile.doc
2. I don't know any other data - smtp-server's name and so on.
3.I want to send mail by simple way without using smtp/pop-components and only using ShellExecute - function!
4.I repeat: all I know - mail and file! That's all!
5.I am tired of this question! Please help me!!!!  
VadikAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

haehnenCommented:
what about this:

 ShellExecute(Application.Handle,PChar('open'),PChar('mailto:name@usa.net'),PChar(''),nil,SW_NORMAL);

bye
0
EpsylonCommented:
This one is more detailed:


procedure TForm1.Button1Click(Sender: TObject);
Var
Buffer : String;
recip,subj,mess : String;
begin
recip:= Edit1.text;   {message recipients email address}
subj:=Edit2.Text;     {message subject}
Mess:= Memo1.Text;    {message body / registration info}
Buffer:='mailto:'+recip+'?subject='+subj+'&body='+mess;
ShellExecute(Application.Handle,'open',PChar(Buffer),nil,nil,SW_Normal);    
Edit1.Clear;          
Edit2.Clear;     {and clean up}
Memo1.Clear;
end;

0
intheCommented:
hello
you cannot send file attachments via shellexecute ,you'll need to at least use mapi if you want to send file attachments.
i know you dont want a component so for ease of use id suggest downloading this tutorial that shows how to do it using mapi code only.

http://www.bhnet.com.br/~simonet/archive/mapimail.zip 


Regards Barry



0
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

VadikAuthor Commented:
Thank you I'll see your examples
0
CalvinDayCommented:
I used the MAPISendDocuments. It's a one liner and has the same effect as the ShellExecute but you can send an attachment.

MAPISendDocuments(Application.Handle, ';','c:\autoexec.bat','Your attachement', 0);

Note: Application.Handle is very important.
0
intheCommented:
answered in my last comment ..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.