Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending a mail attachment via Mail.app



Perhaps this question doesn't belong here but short of sending it to dts, this was the only place I could think of. My apologies if it offends anyone.

It use to be in Mail 1.2 that the following code would create one message with all the files as attachments:

void SendAttachments(long inRefCount, FSRef *inRefList)
{
Str255 mailHelperStr;

if ( !UInternetConfig::PP_ICAvailable() ) {
return;
}

LStr255 prefStr = kICHelper;
prefStr += "\pmailto";

if ( UInternetConfig::PP_ICGetPref(prefStr, mailHelperStr) != 0 ) {
return;
}

ICAppSpec *mailHelperSpec = reinterpret_cast<ICAppSpec *>(mailHelperStr);

FSRef mailRef;
OSStatus result = LSGetApplicationForInfo(kLSUnknownType, mailHelperSpec->fCreator, NULL, kLSRolesAll, &mailRef, NULL);
if ( result != noErr ) {
return;
}

LSLaunchFSRefSpec launchSpec;
launchSpec.appRef = &mailRef;
launchSpec.numDocs = inRefCount;
launchSpec.itemRefs = inRefList;
launchSpec.passThruParams = NULL;
launchSpec.launchFlags = kLSLaunchNoParams | kLSLaunchStartClassic;
launchSpec.asyncRefCon = NULL;

LSOpenFromRefSpec(&launchSpec, NULL);
}

but in Mail 1.2.5 it creates a message for each file. Is there a way to get the old behavior back?
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.