2

I have been trying to send a Cocoa Lumberjack log file through email from within my Mac OSX application, using apple script. Is it possible to do this?

I have a problem with being able to use applescript to get the attachment out of the correct folder, I am able to create and send a message just fine without attachment.

I noticed that there are only really entitlements for accessing the users downloads, pictures, movies, music folder which aren't very convenient to store log files in.

oguz ismail
  • 1
  • 16
  • 47
  • 69
Justin
  • 33
  • 2

1 Answers1

1

Can you get the latest log in objective-c, temporarily write it to an accessible location (e.g. Downloads) and attach to email from there via AppleScript?

NSArray *logFilePathsArray=[[myFileLogger logFileManager] sortedLogFilePaths];
NSString *myLogFilePath=[logFilePathsArray firstObject];
// ... Copy to Downloads folder URL
DDP
  • 2,463
  • 1
  • 26
  • 28