Hello HD
I do not understand Apple Script nor EML structure but the EML file by default is opened by Apple Mail. It is just a taught, how if you tell Apple Mail to open the file and then grab info from there and then close the file and rename it? It might be stupid but it was an idea I get from something I saw and dont understand if even make any sense.
--
Kindest Regards,
Paulo
Friday, 8 of December, 2017 - 09h:03m [+0000]
(*
tell application "Mail"
--activate
set ListMessage to selection -- take all emails selected
repeat with aMessage in ListMessage -- loop through each message
tell aMessage
set messageFrom to sender
set messageSender to extract address from messageFrom
set messageToNameList to to recipients's name
set messageToAddressList to to recipients's address
set messageCCNameList to cc recipients's name
set messageCCAddressList to cc recipients's address
set messageBCCNameList to bcc recipients's name
set messageBCCAddressList to bcc recipients's address
set messageDateR to (date received) as rich text
set messageDateS to (date sent) as rich text
set messageSubject to subject
set messageID to message id as rich text
set mID to id as rich text
set messageSource to source
set messageAllHeaders to all headers as rich text
set messageReplyTo to reply to
set theText to content of aMessage as rich text
set the_source to source of aMessage as rich text
set thesize to message size of aMessage as rich text
end tell
*)