求救,我在做发邮件的时候,用的是TIDSMTP1,在Send(Message)时出现bad sequence of commands,求救(100分)

  • 主题发起人 主题发起人 ProLove
  • 开始时间 开始时间
大伙在给我支点招呀
 
我现在也作收发邮件,也遇到了同样的问题,用163邮箱收邮件行,发邮件不行,出现‘503 Bad sequence of commands ’,用我们的企业邮箱发邮件没问题,
咱们交流一下。
 
知道了看了lzf1010的帖子,解决了
 
大伙将收到的邮件如何保存成eml文件?
 
eml只是某些邮件客户端保存邮件的格式,并不见得是通用的格式,所以idmessage并不会以这种格式来保存的。
 
哦,那邮件一般保存成什么样好些啦,数据库,什么数据库好呢?像FOXMAIL它用得是什么呢?
 
解决办法:http://www.delphibbs.com/delphibbs/dispq.asp?lid=3359545
 
这个啊,你想怎么保存都行啊,这个是由你来决定的,每个人的方法可能不一样
 
jtsnyj你有没有邮箱或在线通读的工具,留一下啦,交流一下
 
ProLove你的qq号?
 
lzf1010求教一个问题,我有一些邮件内容收到的是html格式,怎么解决呀?
 
关于html的问题比较复杂,不是三言两语可以解析清楚的,你可以参考我之前写的一个代码片断,能参考到多少东西我也不知道,还有别的不清楚的东西你可以搜索delphibbs的离线CHM。
procedure TMailReceiveThread.FillMail_Info(UIDL:string);
procedure FillAttachmentInfo;
var
i,index:Integer;
str,FileID:string;
Attachment:TIdAttachmentFile;
Mail_AttachmentInfo:TMail_AttachmentInfo;
begin
for i := 0 to FMessage.MessageParts.Count - 1 do
begin
if FMessage.MessageParts.PartType=mptText then
FMail_Info.Mail_Info_Content:=TIdText(FMessage.MessageParts).Body.Text
else
begin
Attachment:=TIdAttachmentFile(FMessage.MessageParts);
Mail_AttachmentInfo:=TMail_AttachmentInfo.Create;

if Attachment.FileName<>'' then
Mail_AttachmentInfo.AttachmentInfo_Name:=CheckTxt(Attachment.FileName)
else
Mail_AttachmentInfo.AttachmentInfo_Name:='unknown';
Mail_AttachmentInfo.Mail_AttachmentInfo_Content.LoadFromFile(Attachment.StoredPathName);
if FMessage.MessageParts.Items.Headers.IndexOfName('Content-ID')>=0 then
begin
Mail_AttachmentInfo.AttachmentInfo_Type:=1;
str:=FMessage.MessageParts.Items.Headers.Values['Content-ID'];
index:=pos('<',str);
FileID:=Copy(str,index+1,length(str)-index-1);
FMail_Info.Mail_Info_Content:=StringReplace(FMail_Info.Mail_Info_Content,'Cid:'+FileID,CheckTxt(TIdAttachment(FMessage.MessageParts.Items).FileName),[rfReplaceAll,rfIgnoreCase]);
end
else
Mail_AttachmentInfo.AttachmentInfo_Type:=2;

FMail_Info.Mail_AttachmentInfoList.Add(Mail_AttachmentInfo);
end;
end;
end;
begin
FMail_Info.Mail_Info_ID:=UIDL;
FMail_Info.Mail_Info_Subject:=CheckTxt(FMessage.Subject);
FMail_Info.Mail_Info_Date:=FMessage.Date;
FMail_Info.Mail_Info_SaveDate:=Now;
FMail_Info.Mail_Info_Form:=CheckTxt(FMessage.From.Text);
FMail_Info.Mail_Info_To:=CheckTxt(FMessage.Recipients.EMailAddresses);
FMail_Info.Mail_Info_Format:='html';
FMail_Info.Mail_Info_Reply:=CheckTxt(FMessage.ReplyTo.EMailAddresses);
FMail_Info.Mail_Info_Priority:=Ord(FMessage.Priority)+1;
FMail_Info.Mail_Info_CC:=CheckTxt(FMessage.CCList.EMailAddresses);
FMail_Info.Mail_Info_BCC:=CheckTxt(FMessage.BccList.EMailAddresses);
FMail_Info.Mail_Info_ReceiptAddress:=FMessage.ReceiptRecipient.Address;
FMail_Info.Mail_Info_ReceiptUser:=FMessage.ReceiptRecipient.User;
if FMail_Info.Mail_Info_ReceiptAddress<>'' then
FMail_Info.Mail_Info_Receipt:=True;
//好像已经自动解码了
{ if FMessage.ContentTransferEncoding='base64' then
FMail_Info.Mail_Info_Content:=DecodeString(FMessage.Body.Text)
else
FMail_Info.Mail_Info_Content:=FMessage.Body.Text;

FMail_Info.Mail_Info_Content:=CheckTxt(FMessage.Body.Text);}
FMail_Info.Mail_Info_Content:=FMessage.Body.Text;

FillAttachmentInfo;
end;
 
lzf1010你的
CheckTxt函数是怎样写的能贴出来吗?
if FMessage.MessageParts.PartType=mptText then 中的ParType,我的TIdmessage中怎么没有这个ParType方法呀?
 
这些你查一下delphibbs的chm吧
 
后退
顶部