控件

 smtp: TIdSMTP;
 MgeSend: TIdMessage;

代码

procedure TForm1.Button1Click(Sender: TObject);
begin
  SMTP.Host:='smtp.163.com';
  smtp.Username:='zhm001x@163.com';
  smtp.Password:='paswrd';
  smtp.Port:=25;
  smtp.Connect();
  MgeSend.Recipients.EMailAddresses:='zhm001x@qq.com';
  MgeSend.From.Text :='zhm001x@163.com';
  MgeSend.Subject:='test';
  MgeSend.Body.Text:='发邮件测试';
  SMTP.Authenticate;
  Smtp.Send(mgeSend);
end;

相关文章:

  • 2021-12-06
  • 2021-09-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案