線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1271
推到 Plurk!
推到 Facebook!

TIdMessage.LoadFromFile ?????

缺席
ralph
初階會員


發表:41
回覆:82
積分:29
註冊:2003-02-04

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-04-18 23:04:14 IP:66.171.xxx.xxx 未訂閱
Hi: I tried to Load the saved file to IdMessage, but my program was going to stop at the line (IdMessage.LoadFromFile('c:\test.txt')) everytime. error: timeout. It looks like it loads the file infinitely. I met the same problem at IdMessage.LoadFromStream(VStream). Why?? Is it my saved file's problem or ....? Thank you for you help
chiehmin
高階會員


發表:13
回覆:134
積分:134
註冊:2002-05-23

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-04-20 15:47:53 IP:211.75.xxx.xxx 未訂閱
我想應該是 IdMessage1.Body.LoadFromFile('c:\test.txt'); 才對。
mchakuna
一般會員


發表:41
回覆:45
積分:17
註冊:2004-01-07

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-03-25 18:05:14 IP:211.147.xxx.xxx 未訂閱
引言: 我想應該是 IdMessage1.Body.LoadFromFile('c:\test.txt'); 才對。
我也遇到了LoadFromFile这个问题。虽然IdMessage1.Body.LoadFromFile('c:\test.txt');可以没有问题。但似乎这是不对的的做法。因为邮件是分为header和body两部分的。而通过body.loadfromfile读入的应该是不包含header的邮件本。而按你这样读进入来后,邮件体包含了header,解码会失败的。请问怎样才可以解决这个问题?
malanlk
尊榮會員


發表:20
回覆:694
積分:577
註冊:2004-04-19

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-07-20 10:47:23 IP:210.64.xxx.xxx 未訂閱
以下取自 INDY Help 的 TIdMessage.LoadFromFile 應該可以解答這個問題 Note: Both LoadFromFile and LoadFromStream are designed to handle messages written using the SaveToStream or SavedToFile methods in the Indy TIdMessage component. These methods create an encoded version of the message contents that matches the protocol tranmissions used when the message is transmitted using TIdSMTP including the message terminator characters (CRLF.CRLF). If you are trying to import .EML message files from MS Outlook Express, or another email client, make sure that the text file contains the message terminator sequence. An exception will be raised if LoadFromFile or LoadFromStream are used to load files that do not include the message terminator sequence.
系統時間:2024-05-18 14:35:05
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!