本文整理自网络,侵删。
var smtp: TIdSMTP; MgeSend: TIdMessage;
procedure TForm1.Button1Click(Sender: TObject);begin SMTP.Host:='smtp.163.com'; smtp.Username:='xxxx@163.com'; smtp.Password:='paswrd'; smtp.Port:=25; smtp.Connect(); MgeSend.Recipients.EMailAddresses:='xxxx@qq.com'; MgeSend.From.Text :='xxxx@163.com'; MgeSend.Subject:='test'; MgeSend.Body.Text:='发邮件测试'; SMTP.Authenticate; Smtp.Send(mgeSend);end;
相关阅读 >>
Delphi通过将数据放入exe的资源信息中的方式制作自已的安装工具
移植Delphi7的tclientsocket,tserversocket
更多相关阅读请进入《Delphi》频道 >>