Closed
Bug 1506488
Opened 6 years ago
Closed 5 years ago
Support MAPISendMailW
Categories
(MailNews Core :: Simple MAPI, enhancement)
MailNews Core
Simple MAPI
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1048658
People
(Reporter: jorgk-bmo, Assigned: jorgk-bmo)
Details
Attachments
(2 files, 4 obsolete files)
25.04 KB,
patch
|
Details | Diff | Splinter Review | |
10.07 KB,
patch
|
Details | Diff | Splinter Review |
See bug 1505315 for details. https://docs.microsoft.com/en-gb/windows/desktop/api/mapi/nc-mapi-mapisendmailw typedef struct MapiMessageW { ULONG ulReserved; PWSTR lpszSubject; PWSTR lpszNoteText; PWSTR lpszMessageType; PWSTR lpszDateReceived; PWSTR lpszConversationID; FLAGS flFlags; lpMapiRecipDescW lpOriginator; ULONG nRecipCount; lpMapiRecipDescW lpRecips; ULONG nFileCount; lpMapiFileDescW lpFiles; } *lpMapiMessageW; typedef struct MapiRecipDescW { ULONG ulReserved; ULONG ulRecipClass; PWSTR lpszName; PWSTR lpszAddress; ULONG ulEIDSize; PVOID lpEntryID; } *lpMapiRecipDescW; typedef struct MapiFileDescW { ULONG ulReserved; ULONG flFlags; ULONG nPosition; PWSTR lpszPathName; PWSTR lpszFileName; PVOID lpFileType; } *lpMapiFileDescW;
Assignee | ||
Comment 1•6 years ago
|
||
How about this? Basically a copy/paste job. The original code was ugly, so it the result. I added some debug and SendMailW() is now run when using "Sent to > Mail recipient". Sadly no compose window comes up, so something appears to be wrong. This needs more debugging. I had the impression that something was wrong with subject and body, see bug 1505315 comment #21. The subject should be: Emailing: (list of file names) and the body: Your message is ready to be sent with the following file or link attachments: (etc). I only saw an E and a Y.
Assignee | ||
Comment 2•6 years ago
|
||
The compose window doesn't open since the file is not found, debug shows: === CMapiImp::SendMailW nsMapiHook::HandleAttachments: filename: path: D exists = false === HandleAttachments 80520006 === PopulateCompFieldsW 80520006 Something wrong in the string manipulation. That's strange since my initial patch in bug 1505315, attachment 9024216 [details] [diff] [review], didn't show subject/body, but the compose window opened and the file was attached.
Attachment #9024328 -
Attachment is obsolete: true
Attachment #9024328 -
Flags: feedback?(VYV03354)
Assignee | ||
Comment 3•6 years ago
|
||
I can't get this to work. The "unicode" strings for file path, subject and body aren't correct. No idea why.
Attachment #9024451 -
Attachment is obsolete: true
Assignee | ||
Comment 4•6 years ago
|
||
This uses all the wrong structures, subject and body don't work either, but at least the file is attached properly. It's the same filename processing, but here it works and in the other patch it doesn't. Quite puzzling :-( Masatoshi-san, can you see what's going on?
Assignee | ||
Comment 5•6 years ago
|
||
This patch uses the wrong structures. By the looks of it, the "regular" structures and the "wide" structures are the same apart from the character pointers. Unlike the other patch which uses the "right" structures, with this patch at least the file gets attached to the message. Subject and body are truncated to one character. In the other patch which uses the "right" structures, nothing works. So I'm confused.
Attachment #9024556 -
Attachment is obsolete: true
Attachment #9024844 -
Flags: feedback?(VYV03354)
Assignee | ||
Comment 6•6 years ago
|
||
Oops, I forgot to transplant the unicode processing from the other patch. Here it is now, but subject and body are still only one char long, E(mail ...) and Y(our ...).
Attachment #9024844 -
Attachment is obsolete: true
Attachment #9024844 -
Flags: feedback?(VYV03354)
Attachment #9024853 -
Flags: feedback?(VYV03354)
Assignee | ||
Comment 7•5 years ago
|
||
Mike is working on this, too, and we didn't know :-(
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•5 years ago
|
Attachment #9024853 -
Flags: feedback?(VYV03354)
You need to log in
before you can comment on or make changes to this bug.
Description
•