AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language Delphi auf Button klicken und eine mail verschicken
Thema durchsuchen
Ansicht
Themen-Optionen

auf Button klicken und eine mail verschicken

Ein Thema von Christian18 · begonnen am 7. Mai 2004 · letzter Beitrag vom 7. Mai 2004
 
a.vollmer
(Gast)

n/a Beiträge
 
#2

Re: auf Button klicken und eine mail verschicken

  Alt 7. Mai 2004, 21:59
Hier ein Auszug (Procedure) aus den Indy's!

Delphi-Quellcode:
procedure TfrmMessageEditor.bbtnOkClick(Sender: TObject);
begin
   with IdMsgSend do
      begin
         Body.Assign(Memo1.Lines);
         From.Text := UserEmail;
         ReplyTo.EMailAddresses := UserEmail;
         Recipients.EMailAddresses := edtTo.Text; { To: header }
         Subject := edtSubject.Text; { Subject: header }
         Priority := TIdMessagePriority(cboPriority.ItemIndex); { Message Priority }
         CCList.EMailAddresses := edtCC.Text; {CC}
         BccList.EMailAddresses := edtBCC.Text; {BBC}
         if chkReturnReciept.Checked then
            begin {We set the recipient to the From E-Mail address }
               ReceiptRecipient.Text := From.Text;
            end
         else
            begin {indicate that there is no receipt recipiant}
               ReceiptRecipient.Text := '';
            end;
      end;

  {authentication settings}
   case SmtpAuthType of
      0: SMTP.AuthenticationType := atNone;
      1: SMTP.AuthenticationType := atLogin; {Simple Login}
   end;
   SMTP.Username := SmtpServerUser;
   SMTP.Password := SmtpServerPassword;

   {General setup}
   SMTP.Host := SmtpServerName;
   SMTP.Port := SmtpServerPort;

   {now we send the message}
   SMTP.Connect;
   try
      SMTP.Send(IdMsgSend);
   finally
      SMTP.Disconnect;
   end;
end;
unter http://www.nevrona.com/indy findest du evtl. passende Demos!

Gruß

Alex
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:45 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz