请问Kevinwen(壮志凌云),局域网内自己写的邮件程序通过exchange服务器邮件外发的问题

LouisJJW 2002-02-03 08:50:53
请问Kevinwen(壮志凌云),我也遇到了有关exchange的问题,请您指点:
在一个局域网内,用exchange server 作服务器,在每个客户端均有一个outlook express,在任何客户端,使用outlook 收发内/外部邮件都没有问题,我现在自己编了一个客户端邮件收发程序,在接收时不会出错,发送到内部邮箱也不会出错,但是在发送到外部的邮件服务器上时出错:NO valid ricipant. 好像是说他不能识别外部邮件地址。您说这是什么原因? 请您帮帮我,这个问题困扰我多时。
---(我用的delphi写的,使用了Tnmsmtp控件)
...全文
302 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
LouisJJW 2002-02-22
  • 打赏
  • 举报
回复
Kevinwen(壮志凌云),您在哪呀? ? ?
LouisJJW 2002-02-04
  • 打赏
  • 举报
回复
Dear Kevin,
Thank you for you attention. Now i'm in net-House where there is no floppy-driver,So i cann't provide you my sample code. Now i tell you the detailed information about my Programe and the configuration of Exchange server:

LAN: Exchange server,2000+Outlook Express2000+Windows2000
My Programes: Delphi6+Window2000.

TNMsmtp:
ReportLevel = 0
EncodeType = uuMime
ClearParams = True
SubType = mtPlain
Charset = 'us-ascii'

下面是发送部分代码: // 省去了异常处理代码
With NMSMTP1 do
begin
if connected then disconnect;
Host :=SMTPAddress;//我填的是局域网的服务器上的邮件服务器地址,是一个ip址址
Port :=25;
UserID :=trim(eUserName.text); // 在此邮件服务器上申请的邮箱的用户名
Password:=trim(ePassword.text) // eUserName,ePassword---TEdit 控件
try
Connect;
except
showmessage('不能连接服务器!');
exit;
end;
PostMessage.FromAddress :=UserMailAddress; //发送者地址
PostMessage.FromName :=UserName; //发送者姓名
PostMessage.Subject :=ETitle.Text; //主题
PostMessage.ToAddress.Add(EReciever.Text); //接收人地址
PostMessage.Body.Assign(Body.Lines); //主体内容
try
SendMail;
except
showmessage('发送邮件失败!');
exit;
end;
DisConnect;
end

运行后报错: No valid recipient。

注:我的程序不到这个局域网里面运行,在外面运行,通过拨号上网,一点问题都没有。
在这个局域网里,客户端均有一个outlook express 用它发送和接收都没有任何问题,
无论是往局域网内部还是往外部发,只是对极少的服务器上发来的邮件有乱码,

我的分析:
我的程序在从这个局域网的邮件服务器上接收邮件和发送邮件到这个局域网的邮件服务器上时,也不会出任何问题,接收邮件:只需登录到局域网的服务器上,发送邮件:发送到局域网的邮件服务器上也只需登录到局域网的服务器上,但是发送邮件到外部的邮件服务器
就有问题(如263.net,163.net等)我觉得好像是 TNMSMTP的问题,TNMSMTP 封装了Connect和SendMail 方法,对于程序员来说:WinSock与邮件服务器的通信是透明的,好像是WinSock 在第一次握手时就被局域网上的网关还是什么东西阻住,无法与外部的邮件服务器建立连接,TNMSMTP 封装的connect 方法好像存在问题,可能还要设置什么东西,不知通过outlook express 发送邮件时,Exchange server在与外部的邮件服务器建立连接时其具体过程时怎么样的?

-----Louisling
Kevinwen 2002-02-03
  • 打赏
  • 举报
回复
Hi,

The error message does not seem to come from Exchange serve. To verify this, you can use the network monitor to capture the traffic between your workstation and server, find out the accurate problem.

If you can provide me the sample code and your environment, such as exchange server version, service pack version and OS/service pack verion, I will try to verify it for you.

-Kevin.

536

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧