非常郁闷的问题...(Indy邮件) CODE ( 积分: 50 )

  • 主题发起人 主题发起人 yeszhang
  • 开始时间 开始时间
Y

yeszhang

Unregistered / Unconfirmed
GUEST, unregistred user!
此代码发送后收不到:
mmo2.Text:='z阿瑟毒发';
with IdMsgSend do
begin
ContentType:='text/html';
Body.Assign(mmo2.Lines);
From.Text :='13818851887@163.com';
ReplyTo.EMailAddresses :='13818851887@163.com';
Recipients.EMailAddresses :='13818851887@163.com';
Subject := 'zz阿瑟毒发';
Priority := TIdMessagePriority(2);//Normal
ReceiptRecipient.Text := '';
end;
SMTP.AuthenticationType := atLogin;
SMTP.Username := AqEmailPars.SmtpServerUser;
SMTP.Password := AqEmailPars.SmtpServerPassword;
SMTP.Host := AqEmailPars.SmtpServerName;
SMTP.Port := AqEmailPars.SmtpServerPort;
SMTP.Connect;//通过
try
SMTP.Send(IdMsgSend);//通过
finally
SMTP.Disconnect;
end;
发送很正常,也能成功.但就是收不到邮件
把mmo2.Text:='asdfasdf'; 和 Subject := 'zsdfsdfsaf';后却能很正常收到?? 怎么办?
 
此代码发送后收不到:
mmo2.Text:='z阿瑟毒发';
with IdMsgSend do
begin
ContentType:='text/html';
Body.Assign(mmo2.Lines);
From.Text :='13818851887@163.com';
ReplyTo.EMailAddresses :='13818851887@163.com';
Recipients.EMailAddresses :='13818851887@163.com';
Subject := 'zz阿瑟毒发';
Priority := TIdMessagePriority(2);//Normal
ReceiptRecipient.Text := '';
end;
SMTP.AuthenticationType := atLogin;
SMTP.Username := AqEmailPars.SmtpServerUser;
SMTP.Password := AqEmailPars.SmtpServerPassword;
SMTP.Host := AqEmailPars.SmtpServerName;
SMTP.Port := AqEmailPars.SmtpServerPort;
SMTP.Connect;//通过
try
SMTP.Send(IdMsgSend);//通过
finally
SMTP.Disconnect;
end;
发送很正常,也能成功.但就是收不到邮件
把mmo2.Text:='asdfasdf'; 和 Subject := 'zsdfsdfsaf';后却能很正常收到?? 怎么办?
 
就是说不能发送中文的.太搞笑了.估计那里设置错了.请高手帮忙啊.

我以为我的INDY9(7.0自带的)坏了,我又安装了INDY 10. 可有些东西不一样,一下子找不到郁闷:
1.indy 10如何发送附件??
2.indy 10如何验证?

INDY 9的发送附件
IdMsgSend.MessageParts.Clear;
TIdAttachment.Create(IdMsgSend.MessageParts,'C:/1.txt');
INDY 10 竟然没 TIdAttachment 郁闷.

INDY 9的验证:
SMTP.AuthenticationType := atLogin;

INDY10 的
SMTP.Authen 竟然没有atLogin 只有atNone,atDefault,atASSL,E文不好可能写错了:(,不过就这,
没法设置验证的.郁闷..

请指点啊
 
我发现INDY9 自带的那个DEMO发送邮件时,只要把subject(邮件标题)改为中文也发出去收不到?! 怎么搞得,难道我系统坏了? 可我的foxmail正常啊?
 
真有点见鬼,发邮件只是一个程序里的一个小东西
原来刚做完的时候什么都没问题,包括附件啊,标题是中文啊,都成功过的。
可tmd今天早上一搞,也不小的哪弄错了,标题中文发都发不了。
看着foxmail里面以前测试而且成功接收到的邮件我直犯晕。郁闷。

我打开indy的demo
(这个demo我以为我改错了,从新重网络下了个新的也不行)也发现只能发英文标题的。
中文的能发,都收不到。
郁闷啊。怎么弄的??有遇到的吗?
 
我最近也在做邮件系统,没有遇到你的问题。
倒是有的邮件的正文我收不到,
比如大富翁的邮件,标题什么的都能收到,就是正文不知道存到那里了!
 
..........................
 
需要自己转换
 
我把代码一摸一样的,只是邮件内容改了一下的两封邮件通过
IdMessage.SaveToFile('c:/1.txt',False);后的东西给你看看:

这是能收到的(但没把我的文字翻译过来):
From: 13818851887@163.com
Subject:
=?GB2312?B?yKvD5rjEycbG89K1tcTE2rK/uaTX97u3vrMtLcbz0rXUsbmk0NDOqrncwO3P?=

=?GB2312?B?tc2z?=
To: 13818851887@163.com
Content-Type: multipart/mixed;
boundary="=_NextPart_2rfkindysadvnqw3nerasdf";
charset="gb2312"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Date: Thu, 23 Jun 2005 13:18:30 +0800
X-Priority: 3
X-Library: Indy 9.00.10

This is a multi-part message in MIME format

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: multipart/alternative;
boundary="=_NextPart_2altrfkindysadvnqw3nerasdf"

--=_NextPart_2altrfkindysadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

=CE=D2=B2=BB=B0=A6=C4=E3


--=_NextPart_2altrfkindysadvnqw3nerasdf
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html>
<head>
</head>
<body><h1>=C8=AB=C3=E6=B8=C4=C9=C6=C6=F3=D2=B5=B5=C4=C4=DA=B2=BF=B9=A4=D7=
=F7=BB=B7=BE=B3--=C6=F3=D2=B5=D4=B1=B9=A4=D0=D0=CE=AA=B9=DC=C0=ED=CF=B5=CD=
=B3</h1>
=C4=FA=BA=C3:

=C6=F3=D2=B5=D4=B1=B9=A4=D0=D0=CE=AA=B9=DC=C0=ED=
=CF=B5=CD=B3,=CE=AA=C4=FA=CC=E1=B9=A9=C1=BC=BA=C3=B5=C4=C6=F3=D2=B5=D7=CA=
=D4=B4=B9=DC=C0=ED=B7=BD=B0=B8.

=B1=B3=BE=B0=D2=BB. =B9=FA=C4=DA=
=D2=BB=BC=D2=B1=C8=BD=CF=B4=F3=B5=C4=B9=AB=CB=BE=BE=AD=B3=A3=D2=F2=CE=AA=
=B9=A4=D7=CA=B1=ED=BA=CD=B9=D8=BC=FC=BF=CD=BB=A7=CA=FD=BE=DD=CD=E2=D0=B9=
=B6=F8=D2=FD=C6=F0=B5=C4=B9=DC=C0=ED=CE=CA=CC=E2=CD=B7=CD=A8=B2=BB=D2=D1=
=A1=A3=D2=D4=C7=B0=D6=BB=D3=D0=D7=A8=D2=B5=B5=C4=CD=F8=B9=DC=C8=CB=D4=B1=
=C4=DC=B9=BB=BD=F8=C8=EB=C4=DA=B2=BF=BB=FA=C3=DC=CE=C4=B5=B5=C7=F8=A3=AC=
=CF=D6=D4=DA=D6=BB=D2=AA=CF=C2=D4=D8=B8=F6=D0=A1=B3=CC=D0=F2=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4=C9=FA=BB=EE
=CE=D2=
=C3=C7=C3=BF=CC=EC=B6=BC=D4=DA=B4=B4=D4=EC=BB=FA=BB=E1=A3=AC=B7=FE=CE=F1=
=D3=EB=D5=FB=B8=F6=C9=E7=BB=E1
=CE=D2=C3=C7=C3=BF=CC=EC=B6=BC=D4=
=DA=B2=BB=B6=CF=BD=F8=B2=BD=A3=AC=D5=E4=CF=A7=D7=D4=BC=BA=B5=C4=C9=FA=C3=
=FC
=D2=F2=CE=AA=CE=D2=C3=C7=C3=BF=CC=EC=B6=BC=D4=DA=B3=C9=B3=A4=
...... =A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1 =20

=20
=
=
2005=C4=EA5=D4=C2</bod=
y>
</html>


--=_NextPart_2altrfkindysadvnqw3nerasdf--

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: text/plain;
name="企业员工行为监控管理系统.rar"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="企业员工行为监控管理系统.rar"

UmFyIRoHAM+QcwAADQAAAAAAAAA5A3RAkpcAOVgCAAD4AwACbWOdWFJSvjIdM3IAIAAAAMbz0rXU
sbmk0NDOqrzgv9i53MDtz7XNs1zG89K11LG5pNDQzqq84L/YudzA7c+1zbMucHB0AE9qARpOWFTl
Wgp2OBetZUueB/yK12g1PcoS5kiU8MYv6S+QSqD5K54NK1SmGy/k3If6PSB29+I1OWTL8FKvRvxa
M3VMkJbFFXg/sEigXU3yincuhOL4Fb4U+v5ZDhGQsnl7CQvRmJ5K0EvYiu83JksRLj5D+RkZeTgl
中间省略类似代码....
7Mq/lz2jC9k/t3eUysvpT8m2y/vj+qgavtW0HNBP02qJQC55e9/utns0+7+bBGpeuJkrknyjS16g
p8BHmoQhOjVdhfCebzh83/+QzbN04JJZAAAAAAAAAAAAAgAAAAAVTc8yFDA0ADAAAADG89K11LG5
pNDQzqq84L/YudzA7c+1zbMAT2oBGk5YVOVdqkyIOk7RdqdjqqF7BnT7fN9+APA4nBzEPXsAQAcA

--=_NextPart_2rfkindysadvnqw3nerasdf--
.

这是不能收到的:
From: 13818851887@163.com
Subject: =?GB2312?B?NyzO0s7zu+HE48HLLi4=?=
To: 13818851887@163.com
Content-Type: multipart/mixed;
boundary="=_NextPart_2rfkindysadvnqw3nerasdf";
charset="gb2312"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Date: Thu, 23 Jun 2005 13:22:20 +0800
X-Priority: 3
X-Library: Indy 9.00.10

This is a multi-part message in MIME format

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: multipart/alternative;
boundary="=_NextPart_2altrfkindysadvnqw3nerasdf"

--=_NextPart_2altrfkindysadvnqw3nerasdf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

=CE=D2=B2=BB=B0=A6=C4=E3


--=_NextPart_2altrfkindysadvnqw3nerasdf
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html>
<head>
</head>
<body><h1>7,=CE=D2=CE=F3=BB=E1=C4=E3=C1=CB..</h1>
=B5=C0=C7=B8</body>
</html>


--=_NextPart_2altrfkindysadvnqw3nerasdf--

--=_NextPart_2rfkindysadvnqw3nerasdf
Content-Type: text/plain;
name="L.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="L.txt"

ztK1yMTjLtTasbG+qS42OTY3MTI1Mw==

--=_NextPart_2rfkindysadvnqw3nerasdf--
.
 
不是吧.应该不需要自己转换.这些加密解密都是通用.也就是说SMTP发送负责加密(通常base64),POP收到时显示给用户的就解密出来了.

你可以通过foxmail任意选一封邮件,右键查看原始信息,都是我上一贴发过去的样子.
关键是我不知道我的邮件哪里出问题了,对比了好久没找出来.POP根本就不解密我的邮件.

我去163收件箱看了,里面也是乱码.
 
HTTPDecode(StringReplace(copy(Img_MailMsg.Subject,12,length(Img_MailMsg.Subject)-13),'=','%',[rfReplaceAll]))
 
不知有用否???

问题:delphi2005下的indy的IdTCPServer怎么不能发中文?是不是极大的BUG? ( 积分:35, 回复:3, 阅读:63 )
分类:Internet/TCPIP ( 版主:luyear, robertcool )
来自:wishme1, 时间:2005-1-29 16:32:00, ID:2979489 [显示:小字体 | 大字体]

delphi6下的indy都是正常

但是在delphi2005下
procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
begin
AContext.Connection.IOHandler.WriteLn('你们');
end;
客户端接收显示??
而英文发送是正常的,谁有遇到过?



来自:hfghfghfg, 时间:2005-1-29 17:22:25, ID:2979569 | 编辑
UTF8Encode('你们')


来自:wishme1, 时间:2005-1-30 1:13:33, ID:2979830
老大,不行啊,变成三个???
我想应该是编码转话问题,但我对delphi不熟,不知该怎么转
1点多了,好困啊,这个问题搞的焦头烂耳,delphi.net真的是不太行
还能不能帮我想想办法?



来自:wishme1, 时间:2005-3-4 17:16:00, ID:3003286
接受答案了.
 
估计在我发信的时候是不是什么属性没指定好,导致163收件箱根本不认识我的邮件格式,
才导致不帮我解密??

解密肯定不需要我用什么函数去弄了! 因为我只管发送,现在发送的东西163都不认识 ,说明我发的信件可能格式由问题的.
 
是不是邮箱参数设置不对呢?
 
to hfghfghfg:加上去了,同样,乱码,而且更乱,呵呵.郁闷的
 
邮箱不需要设置的呀,因为我一直用这邮箱接其他邮件都没问题.
 
Indy下的邮件发送程序没有做过,但是最近我也在编写邮件收发系统,使用FastNet下的
NMSmtp,NMPop3,可是,发送邮件即便是成功了,打开邮箱也见不到邮件,偶尔会成功一次。
并且一直以来,多数情况下爆发用户名没有得到合法验证,没有发送的权利。但是我查了
NMSmtp中根本没有检查发送方用户名及密码的函数。也不知道怎么回事。能不能帮我指点指点。谢谢了。
 
我的没问题
 
呵呵,我只用d6下面的成功过
 
不用说了,X-Library: Indy 9.00.10
这句重要
邮件头中包含indy字符串的时候,会被163默认成垃圾邮件删除!!!!!!!!!!
明白?没办法,修改源码,去掉Indy源码里面所有的Indy字符串!
 
后退
顶部