<div class="markdown">
<p dir="auto">On 19 Aug 2013, at 19:46, Nitin Goyal wrote:</p>
<blockquote>
<p dir="auto">I send some emails daily with these parameters:</p>
<ol>
<li value=1>Two (To:) recipients.</li>
<li value=2>One BCC recipient.</li>
<li value=3>Predefined text with tomorrow's date (Stuff to be done on 20/Aug/2013).</li>
<li value=4>Attach a particular file.</li>
<li value=5>Predefined body.</li>
<li value=6>Send in the background.</li>
</ol>
<p dir="auto">I have an applescript to do the same in Mail.app. Since I am not using Mail.app anymore and MailMate doesn't seem to have applescript support, can I automate any part of the email?</p>
</blockquote>
<p dir="auto">Yes, you can. It is possible to do it using the <a href="http://manual.mailmate-app.com/extended_url_scheme"><code>mailto:</code> URL scheme</a> via AppleScript, but it is probably easier to use the <a href="http://manual.mailmate-app.com/emate"><code>emate</code></a> utility. Here is a full example where everything should be on one line:</p>
<pre><code>printf "Predefined text with the date of tomorrow with a fixed time: `date -v+1d -v8H -v00M -v00S`\n" |
emate mailto --send-now
--subject "The subject."
--to "Receiver One <receiver1@example.com>, Receiver Two <receiver2@example.com"
--bcc "Receiver Three <receiver3@example.com>"
"~/Desktop/Attachment One.txt"
</code></pre>
<p dir="auto">You can also explicitly control the “From” identity by using the <code>--from</code> argument if you have multiple identities.</p>
<p dir="auto">You can read more about how it works by following the links above, but you are also welcome to ask questions here as well.</p>
<p dir="auto">-- <br>
Benny</p>
</div>