Is there a way to create a new mail with multiple attachments and /mailurl switch using command line?
Background: We are currently developing an Delphi-ERP System. Our customers should get the possibility to select an invoice e.g. and send it as mail with predefined recipient, subject, body-text and some additional PDF attachments. The mails should not be send directly with SMTP, they should be opend with the local mailclient so the final mails can be modified by the users before sending.
So far this is already working with command line for Outlook and Thunderbird. Now we like to implement this functionality for em Clients as well.
What I found so far: MailClient.exe /mailurl "mailto:[email protected]?subject=hello&body=bodytext"
Creates new mail with predefined content but without attachments
MailClient.exe testattachment.txt
Creates a new empty mail with one single attachment
I was not able to find a way to create a new mail with multiple attachments and predefined content. Is it possible?
The alternative way is to create .eml file with the mail content in RFC 5322 format and header X-Unsent: 1. It can be opened through MailClient.exe /open file.eml and it will result in opening the mail as a draft ready to be sent.
work code in command line
“C:\Program Files (x86)\eM Client\MailClient.exe” “c:\test.txt” /mailurl “mailto:[email protected]?subject=hello&body=bodytext”