邮件程序调式出现的奇怪问题!(100分)

  • 主题发起人 主题发起人 onlyboy1314
  • 开始时间 开始时间
O

onlyboy1314

Unregistered / Unconfirmed
GUEST, unregistred user!
我的程序代码<br>procedure TEmail.BitBtn1Click(Sender: TObject);<br>begin<br><br>with IdSMTP1 do<br>begin<br> &nbsp;Host :='smtp.126.com'; &nbsp; Port := 25; // smtp服务默认的端口为25<br> &nbsp;Username:='longli2002';<br> &nbsp;Password:='521314';<br> &nbsp;authenticationType := atLogin;<br>end;<br><br>with Idmessage1 do<br> &nbsp;begin<br> &nbsp; &nbsp;Recipients.EMailAddresses :='onlyboy1314@126.com';//收件人地址<br> &nbsp; &nbsp;From.Address :='longli2002@126.com'; //发件人地址<br> &nbsp; &nbsp;Subject :=edit3.Text; //邮件主题<br> &nbsp; &nbsp;Body.Assign(memo1.Lines); //邮件正文<br> &nbsp; &nbsp;ContentType:='TEXT/PLAIN';<br>end;<br><br>idsmtp1.Connect();<br>with idsmtp1 do<br> &nbsp;try<br> &nbsp; &nbsp;idsmtp1.Send(Idmessage1); //发送刚才创建的邮件<br> &nbsp; &nbsp;ShowMessage('发送完毕'); //发送完毕后提示<br> &nbsp;finally<br> &nbsp; &nbsp;Disconnect;<br> &nbsp; &nbsp;showmessage('发送失败') //断开服务器连接<br>end;<br><br>调试出现的错误提示是:Project project1.exe raised exception class ELdProtocolReplyErrot with message 'bad sequence of commands'<br>请大狭帮忙解决
 
后退
顶部