• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SBSendMail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SBSendMail


  • Subject: SBSendMail
  • From: John MacMullin <email@hidden>
  • Date: Tue, 19 Jun 2012 21:02:17 -0700

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
_______________________________________________

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

  • Follow-Ups:
    • Fwd: SBSendMail
      • From: John MacMullin <email@hidden>
  • Prev by Date: Re: ARC and CFType release callback
  • Next by Date: Re: ARC and CFType release callback
  • Previous by thread: Re: ARC and CFType release callback
  • Next by thread: Fwd: SBSendMail
  • Index(es):
    • Date
    • Thread