EmailAttachment on Mavericks do not works?

Hi there!
I have one of my app that create a pdf, saves it as temporary, create an emailmessage, attaches the pdf as EmailAttachment, then send the mail.
Now, the attached file is shown as a big “?” in the email message received.

Anyone have found the same issue? Is there anything I can do?

My app works fine in 10.6/10.7 and 10.8!!!

Many thanks!

I think the problem is in Apple Mail… If I double click on the big “?” the attached PDF is correctly opened! It’s very strange… the problem is still alive, but I think it’s not our problem.
If Christian (MBS) has news about it…

I’m using AppleScript and this is still working for me on OSX 10.9 :

#If TargetCocoa Dim theSubject As String = "Backup of database " + dbFileName Dim theBody As String = "Database Last Modification Date : " + d.SQLDateTime Dim theAttachment As String theAttachment=SpecialFolder.Documents.Child(DataFolder).Child(DownloadFolder).Child(fName).NativePath OSXSendMail(theSubject, theBody, theAttachment) #EndIf

I did drag this AppleScript “OSXSendMail.scpt” to the project:

on run {theSubject, theBody, theAttachment} tell application "Mail" set newMessage to make new outgoing message with properties {visible:true, subject:theSubject, content:theBody & return & return} tell content of newMessage make new attachment with properties {file name:theAttachment} at after the last paragraph end tell activate end tell end run

I assume you meant with a socket and not with with AppleScript. I just tested this and it works for my gzip files.

Why do you think that Christian can help? Can you post your code?

Well, maybe I have some insight?
The EmailAttachment class has two ways of using.
First you can use LoadFromFile method, which will use base64 encoding.
Or you don’t use the method and simply use new and set properties. This way you can do your own encoding settings.

One of the differences is that EmailAttachment class declares “Content-disposition: attachment” while Apple Mail normally declares “Content-Disposition: inline;”.

The problem is using PDF files…
I prefer do not use applescript…

Sure. Here!

[code] msg=new EmailMessage
msg.AddRecipient(emaildest)
msg.FromAddress = myfromaddress
msg.Subject = “Sending document”
msg.BodyPlainText = “Here the requested document”

attach = new EmailAttachment
attach.LoadFromFile fout 'this is the PDF just saved
msg.Attachments.Append attach

MessagesQueue.Append Msg[/code]

I think its clear…

[quote=42529:@Christian Schmitz]Well, maybe I have some insight?
The EmailAttachment class has two ways of using.
First you can use LoadFromFile method, which will use base64 encoding.
Or you don’t use the method and simply use new and set properties. This way you can do your own encoding settings.

One of the differences is that EmailAttachment class declares “Content-disposition: attachment” while Apple Mail normally declares “Content-Disposition: inline;”.[/quote]
I don’t understand what you mean with the second alternative method… can you explain it please?

do someone knows why folderitem.NativePath works on windows and on mac does not…?

win c:\folder1\folder2\file.pdf - The mail is sent and it attach the file.
mac /folder1/folder2/file.pdf - The mail is sent but it does not attach the file

Thank you