代码如下:只是作了个测试
调试时发现执行在showmessage('连接成功!');是提示成功的
但执行至Send(IdMsgSend);时就提示503 bad sequences of commands
网上也查了但就是没有解决方法,请大侠帮忙 with IdMsgSend do
begin
body.Clear;
Body.Add(suiMemo1.Lines.Text);//内容
From.Text := '[email protected]';
Recipients.EMailAddresses :='[email protected]';//收件人
Subject := Trim(suiEdit5.Text);//主题
end;
With SMTP do
begin
AuthenticationType := atLogin;
UserID := Trim(MAIL_USERNAME.Text);//帐户
Password := Trim(MAIL_PASSWORD.Text);//密码
Host := Trim(MAIL_SMTP.Text);
Port := 25;
try
Connect;
showmessage('连接成功!');
Send(IdMsgSend);
except
showmessage('连接失败!');
exit;
end;
Disconnect;
end;
调试时发现执行在showmessage('连接成功!');是提示成功的
但执行至Send(IdMsgSend);时就提示503 bad sequences of commands
网上也查了但就是没有解决方法,请大侠帮忙 with IdMsgSend do
begin
body.Clear;
Body.Add(suiMemo1.Lines.Text);//内容
From.Text := '[email protected]';
Recipients.EMailAddresses :='[email protected]';//收件人
Subject := Trim(suiEdit5.Text);//主题
end;
With SMTP do
begin
AuthenticationType := atLogin;
UserID := Trim(MAIL_USERNAME.Text);//帐户
Password := Trim(MAIL_PASSWORD.Text);//密码
Host := Trim(MAIL_SMTP.Text);
Port := 25;
try
Connect;
showmessage('连接成功!');
Send(IdMsgSend);
except
showmessage('连接失败!');
exit;
end;
Disconnect;
end;
解决方案 »
- 对于“codegear RAD studio delphi”你有什么看法
- GIFImage?
- 思考了很久 怎么根据此数据库内容生成图片
- fastreport打印不全??乱码??(100分,不够可以加分)
- 怎样改变Help标题和背景的颜色.
- 请各位帮帮忙,关于选择...初学者 在线等待
- 怎样让DbLookupComboBox有默选项?
- 难、难、难!!!难死我了!唉~~~~~~
- 谢谢tangyong_delphi发给我的程序,进来拿分吧!
- DBISAM
- 各位大哥大姐,TwwDBGRID怎么样用代码实现选定一行,并改变选定行的颜色?
- 想做一个文本编辑器,要加一个功能,就是对预先设好的关键字,进行显亮操作。
发送网页类型的话
idmessage.contenttype:='text/html';