var
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;
本文将演示如何使用TIdSMTP组件通过SMTP协议发送邮件,并提供了关键配置信息及发送流程。
2328

被折叠的 条评论
为什么被折叠?



