//SENDEN
procedure TFormMain.Senden1Click(Sender: TObject);
begin
SmtpServerName:=FormServ.Edit1.Text;
SmtpServerPort:=StrToInt(FormServ.Edit2.Text);
SmtpServerUser:=FormServ.Edit3.Text;
SmtpServerPassword:=FormServ.Edit4.Text;
UserEmail:=Self.Edit5.Text;
UserName:=FormServ.Edit6.Text;
Betreff:=Self.Edit7.Text;
Eigenemail:= FormServ.Edit9.Text;
CC:=Self.Edit4.Text;
BCC:=Self.Edit9.Text;
IdSMTP1.Host := SmtpServername;
IdSMTP1.Port := SmtpServerPort;
IdSMTP1.Username := SmtpServerUser;
IdSMTP1.Password := SmtpServerPassword;
IdSMTP1.Connect;
IdMessage1.From.
Name := UserName;
IdMessage1.From.Address:=SmtpServerUser;
IdMessage1.Recipients.Add.Address := UserEmail;
IdMessage1.ReplyTo.Add.Address := EigeneMail;
Idmessage1.CCList.EMailAddresses:=
CC;
IdMessage1.BccList.EMailAddresses:=BCC;
IdMessage1.Subject := Betreff;
IdMessage1.Body.Assign(Memo1.Lines);
//Was soll ich senden?
begin
if RadioButton1.Checked
then
begin
IdMessage1.Priority:=mpNormal;
end
else
IdMessage1.Priority:= mpHigh;
end;
try
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
Idmessage1.Clear;
application.MessageBox('
Erfogreich','
Ergebnis!');
end;