Closed Bug 196881 Opened 23 years ago Closed 21 years ago

when given text via MAPI, are line breaks are removed

Categories

(MailNews Core :: Simple MAPI, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 242973

People

(Reporter: Dirk.Schenkewitz, Assigned: rdayal)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021028 Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021028 Our Software hands some text to the mozilla mail client. When the the text is show in the mail composer, all line breaks are gone. Happens on Win-NT 4.0, 2000 and XP. Just as a hint: The same happens with Netscape 4.78, 6.2.1 and 7.02 on Win-2000 and XP, but not with Netscape 4.78 on Win-NT 4.0, (6.2.1 and 7.02 yet untested). Also, when the mail is sent without user interaction (only possible with Netscape 4.78), it also works on Win-2000. Everything is fine on all mentioned OSes with Outlook as a mail client... What can be wrong - has anybody else observed vanishing line breaks when handing text to Mozilla Mail ? Sorry that I cannot provide more specific information - feel free to ask if i forgot something. Reproducible: Always Steps to Reproduce: The problem is absolutely stable, it happens every time as described in "Details". But I cannot give you a recipe to reproduce it, because you would need our commercial software, which in turn has a client part (running on windows nt 4.0 or 2000 or XP) and a server part that can also run on must unixes including Linux. Actual Results: Text that has line breaks in it is shown without them. Expected Results: keep all line breaks that are in the text handed to it. This came up when testing the new mail feature of our software. Now all we can do is to write in our docs: You cannot use Mozilla-Mail because it removes all line breaks. That's a real pity, I think.
Sorry for the writing mistakes: "when given text via MAPI, are line breaks are removed" should be "when given text via simple MAPI, ALL line breaks are removed" I just downloaded Mozilla 1.3b (Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3b) Gecko/20030210) and tried again. All line breaks vanish as before, so it's still there. Since I could hardly believe it, I switched back to Netscape 4.78, tried again - works like a charm. Tested ONLY on my Win-NT 4.0 system. Oh, and I can send you the piece of code form our software which deals with the sMAPI interface, if you want.
Okay, I found the workaround: After handing the mail over to Mozilla, change the default text type(?) from "Body Text" to "Preformat". Then the vanished formatting comes back. I found that just by chance. Now that I've found it, I think it would be nice to select "Preformat" as default for stuff given via MIME, it does what normall is expected and "Preformat" is the default when opening the Composer to write a new (normal) mail. Or perhaps have a configuration item with which it is possible to select the default vor MIME data.
I suffer from this bug also. I access simple MAPI from within C++ program. I sought some in actual Mozilla src and IMHO is the source of the bug in conversion to UNICODE. If MAPI Interface is not called with MAPI_UNICODE flag set, a conversion function nsMapiHook::PopulateCompFieldsWithConversion(...) (file msgMapiHook.cpp) for all fields of MapiMessage structure is called. IMHO inside this function is the reason of dismissing line ends. I will not be surprised, if bug #189344 is dependant of this function.
This bug only appears when "Compose messages in HTML format" is selected.
Thunderbird version 0.7.1 (20040626) I need to say that I have the same problem. It is a pity that the bug is in the Simple MAPI implementation for over a year. It can't be that difficult to track it down. If there aren't enough resources to fix it the bug it would be a pleasure for me to fix it. But since I don't have any experience with the mozilla source tree, I might not be the best person to do it. Here is a code snippet to reproduce the bug: MapiMessage msg; memset(&msg,0,sizeof(msg)); msg.lpszNoteText="1st Line\n 2nd line but no line break..."; lpMAPISendMail(NULL, (ULONG)NULL, &msg, (FLAGS) (MAPI_LOGON_UI | MAPI_DIALOG),0); //lpMAPISendMail points the MAPISendMail function the thunderbird Mapi DLL. Note that in order to reproduce the bug, the editor needs to compose mails in HTML format by default.
Product: MailNews → Core
*** Bug 242892 has been marked as a duplicate of this bug. ***
Apparently this has been fixed. *** This bug has been marked as a duplicate of 242973 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.