Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

It can be so easy to have your application pop up an email window.
Assuming that an a mail reader is installed.

Uses ShellAPI;

ShellExecute(0,'open','mailto:DePaasHaas@DePaasHaas.com?subject=nice job', NIL, NIL, SW_SHOWNORMAL);

You must have the component TNMSMTP from FastNet tools. This component is included in Delphi 4-5 Professional and Enterprise

procedure TForm1.Button1Click(Sender:Object);
Begin
NMSMTP1.Host := 'mail.host.com';
NMSMTP1.UserID:= 'username';
NMSMTP1.Connect;
NMSMTP1.PostMessage.FromAddress:='webmaster@swissdelphicenter.ch';
NMSMTP1.PostMessage.ToAddress.Text := 'user@host.com';
NMSMTP1.PostMessage.Body.Text := 'This is the message';
NMSMTP1.PostMessage.Subject:='Mailsubject;
NMSMTP1.SendMail;
showmessage('Mail sent !');
end;

CLICK TO REGISTER