Closed Bug 107697 Opened 23 years ago Closed 23 years ago

Change MAPI SendMail to comply with Message Compose changes

Categories

(MailNews Core :: Simple MAPI, defect, P1)

x86
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.8

People

(Reporter: rdayal, Assigned: rdayal)

References

Details

Attachments

(1 file)

There has been a design change in the Message Compose interfaces, this effects the design of MAPISendMail and MAPISendDocument implementation. This bug is to track these modifications for trunk landing. Below is the mail from JF regarding these changes : Hi Rajiv, I checked in this morning some major change that affect the way we manage attachment in message compose. I have replaced the string list we were using in nsIMsgCompFieds by an array of object of type nsIMsgAttachment. Also, I have made some of the APIs obsolete. Think to not use anymore: nsIMsgCompFields::GetAttachments nsIMsgCompFields::SetAttachments nsIMsgCompFileds::GetTemporaryFiles nsIMsgCompFileds::SetTemporaryFiles instead, use the new one: nsIMsgCompFileds::GetAttachmentsArray nsIMsgCompFileds::AddAttachment nsIMsgCompFileds::RemoveAttachment nsIMsgCompFileds::RemoveAttachments Also, I made obsolete nsIMsgComposeService::OpenComposeWindowWithValues and nsIMsgComposeService::OpenComposeWindowWithCompFields. If I remember right, you are not using them. The goal of this change is to allow to specify more information about attachment. Now you can specify the name, the url, if it's a temp file, the content-type, etc... That should allow you to simplify your code. Let me know if you have any question JFD
Summary: Change MAPI SendMail, To comply with Message Compose design changes modify SendMail and SendDoc design → Change MAPI SendMail, SendMail to comply with Message Compose changes
Blocks: 104672
Target Milestone: --- → mozilla0.9.6
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Hi JF and Scott, Can u please r and sr the attached patch with changes in SendMail code to comply with the changes in Msg Compose to handle attachments using the path name and real file name. thanks, - Rajiv.
Summary: Change MAPI SendMail, SendMail to comply with Message Compose changes → Change MAPI SendMail to comply with Message Compose changes
Reassign to Krishna, since Rajiv is on vacation.
Assignee: rdayal → kkhandrika
Comment on attachment 56761 [details] [diff] [review] patch with changes to comply with changes in Msg Compose looks good. R=ducarroz
Attachment #56761 - Flags: review+
Priority: -- → P1
+ nsAutoString realFileName ; + realFileName.AssignWithConversion ((char *) aFiles[i].lpszFileName) ; + attachment->SetName(realFileName.get()) ; can probably be expressed as attachment->SetName(NS_LITERAL_STRING( (char *)aFiles[i].lpszFileName).get()); which potentially saves an extra string copy. other than that, everything looks good.
The NS_LITERAL_STRING mechanism doesn't work here as it is internally converted using the standard 'L' convertion macro, wich takes a literal string and substitutes in pre-processing phase.
reassigning to rdayal.
Assignee: kkhandrika → rdayal
if ns_Literal_STRING won't work, how about nsDependentString instead of nsAutoString?
attachment->SetName expects a unicode string, so we need to convert the ascii string data here to unicode string data, nsDependentString wouldnt do this for us.
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Comment on attachment 56761 [details] [diff] [review] patch with changes to comply with changes in Msg Compose sr=mscott
Attachment #56761 - Flags: superreview+
checked in to MAPI_NEW_DIR_TRUNK branch.
checked into the trunk.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified on mozilla & netscape trunk 2002022703 builds
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: