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 内存池

Delphi 无法调用cmd nbtstat命令解决办法

Delphi fmx检测屏幕旋转

Delphi showmainform := false 失效的解决办法

Delphi idftp发送本机ip和外网ip

Delphi 有关pchar.strcopy的实验

Delphi基于高斯-拉普拉斯算子的图像边缘检测

Delphi 打开android应用信息

Delphi 创建并调用 dll

提供文件操作 单元

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



打赏

取消

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

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

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

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

评论

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