Fwd: SBSendMail
Fwd: SBSendMail
- Subject: Fwd: SBSendMail
- From: John MacMullin <email@hidden>
- Date: Tue, 19 Jun 2012 22:25:53 -0700
Ok, so I am answering my own questions.
First, I added the following to the MailOutgoingMessage interface in the Mail.h file: "@property (copy) MailRichText *content; // Contents of an email message".
This I copied from the MailMessage interface, but removed the read only.
Now both of the following work and I have no warning messages:
[[[emailMessage content] paragraphs] addObject:theAttachment];
[[emailMessage.content attachments] addObject: theAttachment];
It would seem that the generation of the Mail.h file in implementing Scripting Bridge may have an issue?
Begin forwarded message:
> From: John MacMullin <email@hidden>
> Subject: SBSendMail
> Date: June 19, 2012 9:02:17 PM MST
> To: email@hidden
>
> SBSendMail, from Apple's Scripting Bridge example, gives an error on:
>
> [[emailMessage.content attachments] addObject: theAttachment];
>
> The header file, Mail.h, does not have "content" for a new outgoing message, which doesn't make any sense, since the example sets the property "content" at the outset.
>
> I used instead: [[[emailMessage content] attachments] addObject: theAttachment];
>
> But get a warning error that says "MailOutgoingMessage may not respond to content".
>
> However, it does respond and the attachment is attached to the email.
>
> It would seem that I shouldn't get an error message?
>
> BTW I used: [NSURL fileURLWithPath:attachmentFilePath isDirectory:(BOOL)NO] instead of the example code.
>
> Best regards,
>
> John MacMullin
Best regards,
John MacMullin
Attorney at Law
9634 North 7th Avenue
Phoenix, AZ 85021
1-602-904-5426
1-800-924-8548
Email:email@hidden
Skype: john_macmullin
www.macmullin.info
CONFIDENTIALITY - The information contained in this email is confidential information, may be legally privileged, and is intended only for the use of the individuals or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any disclosure, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone or by reply letter and delete or destroy the message in its entirety.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >SBSendMail (From: John MacMullin <email@hidden>) |