Mega Code Archive

 
Categories / Delphi / API
 

To send mail from shellexecute command

uses shellapi; procedure TForm1.Button1Click(Sender: TObject); var em_subject, em_body, em_mail : string; begin em_subject := 'Test Message'; em_body := 'Hello this is a test Message from Shell Execute Command to Open the Default Mail Wndow'; em_mail := 'mailto:jdhiraj@rediffmail.com?subject=' + em_subject + '&body=' + em_body ; ShellExecute(Handle,'open', PChar(em_mail), nil, nil, SW_SHOWNORMAL); end;