delphi IdSMTP发送邮件


本文整理自网络,侵删。

 IdSMTP1.Host:=CBServer.Text;
IdSMTP1.Port:=25;
IdSMTP1.AuthenticationType:=atLogin;
IdSMTP1.Username:=Trim(Edit1.Text);
IdSMTP1.Password:=Trim(Edit2.Text);
IdSMTP1.Connect();
IdMessage1.ContentType :='text/html';
IdMessage1.From.Text :=Trim(Edit1.Text)+'@'+Copy(CBServer.Text,6,Length(CBServer.Text));
IdMessage1.Recipients.EMailAddresses :=Trim(Edit3.Text);
IdMessage1.Subject :='文件';
IdMessage1.Priority:=mpHighest; //邮件的优先级--高级
for i:=0 to ListBox1.Items.Count - 1 do
begin
Tidattachment.Create(IdMessage1.MessageParts,ListBox1.Items.Strings[i]); //附件
IdMessage1.MessageParts.Add;
end;
IdSMTP1.Send(IdMessage1);

相关阅读 >>

Delphi基于prewitte算子的图像边缘检测

Delphi 判断文件是否是图像文件

Delphi驱动结束进程

Delphi timer定时器 实现定时执行

Delphi 工程判断内存溢出reportmemoryleaksonshutdown := true;

Delphi 声明指令 调用左右

Delphi firedac 下的 sqlite [1] - 前言

Delphi中多线程分析详解

Delphi实现ping功能的类

Delphi tclientdataset的全面剖析

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...