我一直在使用的演示用Delphi 7.一切正常摆弄SMTP客户端和服务器组件在印第安纳波利斯9。但是,当我登录服务器时,演示仅显示电子邮件主题和邮件正文,From:
和To:
字段未显示。印SMTP服务器和Telnet
下面的代码显示了AMsg
缺乏相关数据。
procedure TForm1.IdSMTPServer1ReceiveMessageParsed(ASender: TIdCommand;
var AMsg: TIdMessage; RCPT: TIdEMailAddressList;
var CustomError: String);
begin
// This is the main event if you have opted to have the idSMTPServer to do your parsing for you.
// The AMessage contains the completed TIdMessage.
// NOTE: Dont forget to add IdMessage to your USES clause!
ToLabel.Caption := AMsg.Recipients.EMailAddresses;
FromLabel.Caption := AMsg.From.Text;
SubjectLabel.Caption := AMsg.Subject;
Memo1.Lines := AMsg.Body;
// Implement your file system here :)
end;
有人可以提出一个理由吗? 首先,感谢雷米的回应。 其次,看来我不能在这里发表图片,然而,但这里是服务器的telnet会话https://postimg.org/image/f0n9j0kcx/的图片的链接。 telnet会话显示服务器响应。 也感谢提醒我关于Wireshark以及使用TIdLog组件的建议。
欢迎来到StackOverflow。请显示您通过Telnet发送的实际命令,您可能会丢失一些东西。 –
如何发布我的Telnet会话的图像?它是否在评论中出现在这里,还是我点击“回答你的问题”? – grasshopper
如果您从终端窗口复制/粘贴实际的命令,而不是张贴图像,会更好。但无论哪种方式,请[编辑您的问题](http://stackoverflow.com/posts/41686677/edit)以包含新信息,请勿将其发布在答案或评论中。 –