<div class="markdown">
<p dir="auto">On 22 Aug 2013, at 10:47, Nitin Goyal wrote:</p>

<blockquote>
<blockquote>
<p dir="auto">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>

<p dir="auto">[...]</p>
</blockquote>

<p dir="auto">I have made a symbolic link to emate ("~/bin/emate).<br>
How do I run emate from there?</p>
</blockquote>

<p dir="auto">You can do it explicitly in the Terminal:</p>

<pre><code>/Users/<your username>/bin/emate --help
</code></pre>

<p dir="auto">or</p>

<pre><code>~/bin/emate --help
</code></pre>

<p dir="auto">(You can avoid the <code>~bin</code> part if it is in your default PATH.)</p>

<blockquote>
<p dir="auto">How to pass these arguments to emate?</p>
</blockquote>

<p dir="auto">All I wrote should be on a single line. Like this:</p>

<pre><code>printf "Predefined text with the date of tomorrow with a fixed time: `date -v+1d -v8H -v00M -v00S`\n" | ~/bin/emate mailto --send-now --subject "The subject." --to "Receiver One <receiver1 at example.com>, Receiver Two <receiver2 at example.com" --bcc "Receiver Three <receiver3 at example.com>" "~/Desktop/Attachment One.txt"
</code></pre>

<p dir="auto">The first part generates body text for the message with a date for tomorrow at 8 inserted (just an arbitrary example):</p>

<pre><code>printf "Predefined text with the date of tomorrow with a fixed time: `date -v+1d -v8H -v00M -v00S`\n"
</code></pre>

<p dir="auto">This is then given to <code>emate</code> via <code>stdin</code> using the pipe character: <code>|</code>. Finally, <code>emate</code> is given arguments with the subject and recipients followed by paths to any attachments.</p>

<p dir="auto">Note that this is just an example. Think of <code>emate</code> as a building block. In this example I use <code>printf</code> as another building block, but it could be replaced by anything providing text to be given via <code>stdin</code> to <code>emate</code>. For example, if you have a file with the body text then you could just do like this:</p>

<pre><code>cat message_body.txt | ~/bin/emate ...
</code></pre>

<p dir="auto">I hope that helps a bit.</p>

<p dir="auto">-- <br>
Benny</p>

</div>