5,386
社区成员
发帖
与我相关
我的任务
分享
case Combobox1.ItemIndex of
0 : IdSMTP1.AuthenticationType:=atLogin; // 需要认证
1 : IdSMTP1.AuthenticationType:=atNone; // 无需认证
end;
try
IdSMTP1.Connect;
except
statusbar1.Panels[0].text:=IntToStr(List)+'、无法连接到服务器!';
exit;
end;
Try
IdSMTP1.Send(TM);
except
IdSMTP1.Disconnect;
statusbar1.Panels[0].text:=IntToStr(List)+'、发送邮件失败!';
exit;
end;