300分求助,用indy发的mail被foxmail认为是垃圾邮件!!!急! ( 积分: 300 )

  • 主题发起人 主题发起人 XiaoLiang
  • 开始时间 开始时间
X

XiaoLiang

Unregistered / Unconfirmed
GUEST, unregistred user!
delphi7+indy9
生成邮件程序如下:
with IdMsgSend do
begin
Body.Clear;
Body.Add(sMemo);
From.Text := trim(RzEdit_email.Text);
ReplyTo.EMailAddresses := trim(RzEdit_email.Text);
Recipients.EMailAddresses := sToAddr;
Subject := sHeader;
end;
IdMsgSend.MessageParts.Clear;
TIdAttachment.Create(IdMsgSend.MessageParts,sAttach);
发送成功接收后,发现这样一个问题:用foxmail接收,会把这封邮件自动转移到垃圾邮件箱!仔细观察用它发的邮件与其他邮件的不同之处:
用indy发的邮件头:
From: xx@xxx.com
Subject: This a =?GB2312?B?suLK1A==?=
To: xxx@xxx.com
MIME-Version: 1.0
Reply-To: xxx@xxx.com
Date: Wed, 27 Apr 2005 11:20:19 +0800
X-Priority: 3 (Normal)
X-Library: Indy 9.00.10
X-MIMETrack: Itemize by SMTP Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-27 11:22:25,
Serialize by POP3 Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-27 11:22:53
Message-ID: <OF77C7C0DC.DCEDE320-ON48256FF0.00128858@xxx.com>
Content-Type: multipart/mixed; boundary=&quot;=_NextPart_2rfkindysadvnqw3nerasdf&quot;


--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Transfer-Encoding: 7bit // 关键应该在这里
Content-Type: text/plain

hello,你好

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: application/octet-stream;
name=&quot;cc.dbf&quot;
Content-Disposition: attachment;
filename=&quot;cc.dbf&quot;
Content-Transfer-Encoding: base64

A2kEGwIAAAChAPUBAAAAAAAAAAAAAAAAAAAAAAB6AABUT19BREQAAAAAAEMBAAAAMgAAAAAAAAAA

用foxmail发的邮件头如下:

Date: Tue, 26 Apr 2005 11:42:31 +0800
From: &quot;=?gb2312?B+?=&quot; <xxx@xxx.com>
To: &quot;=?gb2312?B?x/jW0NDEywytK>
Subject: =?gb2312?B?4=?=
X-mailer: Foxmail 5.0 [cn]
Mime-Version: 1.0
X-MIMETrack: Itemize by SMTP Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-26 11:44:32,
Serialize by POP3 Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-26 11:51:47
Message-ID: <OF6D479458.CFE3E7DF-ON48256FEF.00148EA6@xxx.com>
Content-Type: multipart/mixed;
boundary=&quot;=====001_Dragon385124177348_=====&quot;


--=====001_Dragon385124177348_=====
Content-Type: multipart/alternative;
boundary=&quot;=====003_Dragon385124177348_=====&quot;


--=====003_Dragon385124177348_=====
Content-Transfer-Encoding: base64 // 这里就不一样了。
Content-Type: text/plain;
charset=&quot;gb2312&quot;

x/jW0NDEwey1vLywytK+rcDto6zE+rrDo6EgDQoNCqG

为此,我用了
IdMsgSend.ContentType := 'text/plain';
IdMsgSend.ContentTransferEncoding := 'base64';
IdMsgSend.CharSet := 'gb2312';
等等,发送的邮件头信息仍然编码为:
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

请叫那位高手能否解决这个问题,反正我分多,随便给
 
delphi7+indy9
生成邮件程序如下:
with IdMsgSend do
begin
Body.Clear;
Body.Add(sMemo);
From.Text := trim(RzEdit_email.Text);
ReplyTo.EMailAddresses := trim(RzEdit_email.Text);
Recipients.EMailAddresses := sToAddr;
Subject := sHeader;
end;
IdMsgSend.MessageParts.Clear;
TIdAttachment.Create(IdMsgSend.MessageParts,sAttach);
发送成功接收后,发现这样一个问题:用foxmail接收,会把这封邮件自动转移到垃圾邮件箱!仔细观察用它发的邮件与其他邮件的不同之处:
用indy发的邮件头:
From: xx@xxx.com
Subject: This a =?GB2312?B?suLK1A==?=
To: xxx@xxx.com
MIME-Version: 1.0
Reply-To: xxx@xxx.com
Date: Wed, 27 Apr 2005 11:20:19 +0800
X-Priority: 3 (Normal)
X-Library: Indy 9.00.10
X-MIMETrack: Itemize by SMTP Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-27 11:22:25,
Serialize by POP3 Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-27 11:22:53
Message-ID: <OF77C7C0DC.DCEDE320-ON48256FF0.00128858@xxx.com>
Content-Type: multipart/mixed; boundary=&quot;=_NextPart_2rfkindysadvnqw3nerasdf&quot;


--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Transfer-Encoding: 7bit // 关键应该在这里
Content-Type: text/plain

hello,你好

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: application/octet-stream;
name=&quot;cc.dbf&quot;
Content-Disposition: attachment;
filename=&quot;cc.dbf&quot;
Content-Transfer-Encoding: base64

A2kEGwIAAAChAPUBAAAAAAAAAAAAAAAAAAAAAAB6AABUT19BREQAAAAAAEMBAAAAMgAAAAAAAAAA

用foxmail发的邮件头如下:

Date: Tue, 26 Apr 2005 11:42:31 +0800
From: &quot;=?gb2312?B+?=&quot; <xxx@xxx.com>
To: &quot;=?gb2312?B?x/jW0NDEywytK>
Subject: =?gb2312?B?4=?=
X-mailer: Foxmail 5.0 [cn]
Mime-Version: 1.0
X-MIMETrack: Itemize by SMTP Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-26 11:44:32,
Serialize by POP3 Server on mail/gxmcc(Release 6.5.3|September 14, 2004) at
2005-04-26 11:51:47
Message-ID: <OF6D479458.CFE3E7DF-ON48256FEF.00148EA6@xxx.com>
Content-Type: multipart/mixed;
boundary=&quot;=====001_Dragon385124177348_=====&quot;


--=====001_Dragon385124177348_=====
Content-Type: multipart/alternative;
boundary=&quot;=====003_Dragon385124177348_=====&quot;


--=====003_Dragon385124177348_=====
Content-Transfer-Encoding: base64 // 这里就不一样了。
Content-Type: text/plain;
charset=&quot;gb2312&quot;

x/jW0NDEwey1vLywytK+rcDto6zE+rrDo6EgDQoNCqG

为此,我用了
IdMsgSend.ContentType := 'text/plain';
IdMsgSend.ContentTransferEncoding := 'base64';
IdMsgSend.CharSet := 'gb2312';
等等,发送的邮件头信息仍然编码为:
Content-Transfer-Encoding: 7bit
Content-Type: text/plain

请叫那位高手能否解决这个问题,反正我分多,随便给
 
unit SendEmail;

interface
uses
Windows, Messages, SysUtils, Variants,Forms, Classes,IdMessage, IdBaseComponent, IdComponent,

IdTCPConnection,
IdTCPClient, IdMessageClient, IdSMTP,IdGlobal;

Function Sned_Email(EForm,E_TO:String;UserN:String;
PassW:string;
Body:String;
Subject:string;
Attach:string;
IsShowMsg:boolean):boolean;

implementation


Function Sned_Email(EForm,E_TO:String;UserN:String;
PassW:string;
Body:String;
Subject:string;
Attach:string;
IsShowMsg:boolean):boolean;

var IdSMTP1:TIdSMTP;
IdMessage1: TIdMessage;
begin
Result:=true;
IdMessage1:=TIdMessage.Create(Application);
Idsmtp1:=TIdSMTP.Create(Application);

IdMessage1.Body.Text:=Body;
IdMessage1.Subject:=Subject;
IdMessage1.From.Text:=EForm;
IdMessage1.Recipients.EMailAddresses:=E_TO;
if Attach<>'' then
if FileExists(Attach)then
TIdAttachment.Create(Idmessage1.MessageParts, Attach);
IdSmtp1.Host:='smtp.sohu.com';
IdSMTP1.AuthenticationType:=atLogin;
IdSMTP1.Username:=UserN;
IdSmtp1.Password:=PassW;
IdSMTP1.Port:=25;
Try
try
IdSMTP1.Connect(IdTimeoutDefault);
IdSmtp1.Send(IdMessage1);
except
if IsShowMsg then
MessageBox(Application.Handle,'SMTP服务器连接出错!','提示',MB_OK);
Result:=False;
end;
Finally
IdMessage1.Free;
IdSmtp1.Free;
end;

end;


end.
 
Avalon老大,你用你的这个邮件发送程序发给自己后,你看看邮件头信息是怎样的?
我的邮件发送程序与你可以说是一样的(毕竟都是看demo),我只是没把发送的代码贴出而已!
 
呵呵 我只是试验了一下 看看有没有自动放到垃圾邮件箱里
 
Return-Path: <xukehg@yeah.net>
Delivered-To: xukehg@mx14.mail.sohu.com
Received: from amw_avalon (unknown [219.133.246.126])
by sohumx112.sohu.com (Postfix) with ESMTP id 81D8309147D
for <xukehg@sohu.com>; Wed, 27 Apr 2005 14:58:34 +0800 (CST)
From: xukehg@yeah.net
Subject: =?GB2312?B?aGVsbG+jrMTjusM=?=
To: xukehg@sohu.com
Date: Wed, 27 Apr 2005 15:00:12 +0800
X-Priority: 3
X-Library: Indy 9.00.10
Message-Id: <20050427065835.81D8309147D@sohumx112.sohu.com>
Status: U
X-UIDL: 1114585047.22652_17.mx14.mail.sohu.com

hello,你好
 
看这样子,是被foxmail放到垃圾邮件里的了。
 
看到了吗?
X-Library: Indy 9.00.10
估计像很多邮件服务器拒收Indy发过来的信件一个原理.
你去吧indySMTP的这个属性改掉试一试
 
或者干脆把indySMTP中所有有关indy的属性字符串全部改掉
 
我已修改,把MailAgent修改成foxmail5.0,还是会被foxmail放到垃圾箱中。
 
哎.....别提了,我的工资单都被当垃圾信.....眼泪哗哗的
 
研究了一下,应该怎样强制要求idmessage.body进行编码,估计就可以了。
 
顶上,难道这么难吗?
 
可能是你构造信体的时候有问题,可不可以把你的原码发过我看看!
shugengboy@163.com
 
foxmail 4.2没问题
 
就是 X-Library: Indy 9.00.10 导致的问题,把Indy标志改成另外一个字符串,然后把Indy组件包重新编译之后,把生成的dcu覆盖掉Lib下的dcu之后,再build生成EXE,就可以啦
 
lichengbin:
我已照办,从收到的邮件原始信息中已找不到indy的标志,仍然被foxmail视为垃圾,
可恶!
小尹:
其实我已基本把源码写上了,你看看我的第一个发言。

再次申明,如能解决,一定加分。
 
后退
顶部