Closed Bug 17822 Opened 26 years ago Closed 26 years ago

Can't load a file using nsIFileSpec instance

Categories

(Core :: DOM: Editor, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: ppandit, Assigned: ppandit)

Details

Using a debug build from 11/1/99 I have a testcase that used to work but now has a problem. It loads a txt file that contains a mail message and sends it using an XPConnect interface. The message still gets sent but the file does not get loaded. Code ----- function Do_SendMailMessage() { var phonyURL = Components.classes["component://netscape/network/simple-uri"].createInstance(Com ponents.interfaces.nsIURI); try { var filespec = Components.classes["component://netscape/filespec"].createInstance(Components.in terfaces.nsIFileSpec); filespec.nativePath = "SampleMailMessage.txt"; } catch (ex) { dump("Cannot create an instance of nsIFileSpec\n"); } // filespec.nativePath = "SampleMailMessage.txt"; interfaceofsmtpservice.SendMailMessage(filespec,"ppandit@netscape.com",null,null ,phonyURL); document.testcasesform.textarea.value = "SendMailMessage passes \n"; } Dos Window Output ------------------
Sorry - pressed Enter by mistake. Here is the complete code and output function Do_SendMailMessage() { var phonyURL = Components.classes["component://netscape/network/simple-uri"].createInstance(Com ponents.interfaces.nsIURI); try { var filespec = Components.classes["component://netscape/filespec"].createInstance(Components.in terfaces.nsIFileSpec); filespec.nativePath = "SampleMailMessage.txt"; } catch (ex) { dump("Cannot create an instance of nsIFileSpec\n"); } // filespec.nativePath = "SampleMailMessage.txt"; interfaceofsmtpservice.SendMailMessage(filespec,"ppandit@netscape.com",null,null ,phonyURL); document.testcasesform.textarea.value = "SendMailMessage passes \n"; } Dos Output Window ----------------- Document http://bubblegum/NGdriver/suites/mail/mncompose010new.html loaded succe ssfully Document: Done (1.683 secs) Warning: should this ever happen?: 'PR_FALSE', file D:\mozilla\editor\base\nsEdi tor.cpp, line 619 Opening file SampleMailMessage.txt failed
Assignee: beppe → jfrancis
Joe -- is this the problem we talked about? Shoule this be assigned to you or someone else? If you, please set the milestone.
Assignee: jfrancis → beppe
I know about the warning, and that's my problem. But it has nothing to do with this bug. This should be reassigned to whoever owns SendMailMessage(). handing off to beppe for disposition.
SendMailMessage is a method within the nsISmtpService interface that mscott handles.
Assignee: beppe → mscott
well, then off to mscott it goes
Par, I'm confused. How can the message get sent if the file doesn't get opened? It sounds like we are reading your file and sending the message right? Or are you getting a blank message that didn't contain the message in your file?
Assignee: mscott → ppandit
Reassigning to Par to decide if there's a real bug here or not
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Tested again removing test method code. You can check by loading http://bubblegum/NGDriver/suites/mai/bug17822.html The issue is that if I load the file as an http:// in the location bar then the failure occurs. But if I use File->Open File or File->Open Web Location then I do not see the "Opening file SampleMailMessage.txt failed" error. Looks like I need handle better my nsIFileSpec parameter to SendMailMessage. MARKING AS INVALID and VERIFIED. I may have to reopen this later if I cannot find a solution.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.