<div class="markdown">
<p dir="auto">On 24 Aug 2013, at 9:20, Nitin Goyal wrote:</p>
<blockquote>
<p dir="auto">I need to do the following:</p>
<ol>
<li value=1>Capture Safari tab Title as "Subject".</li>
<li value=2>Capture Safari tab URL as "Body".</li>
<li value=3>Insert an email address in the "To" field.</li>
<li value=4>Send email in the background.</li>
</ol>
<p dir="auto">I have made a Keyboard Maestro macro to do the same. But, is doesn't do it in<br>
background. It shows the compose window momentarily. How can this be achieved via applescript or emate?</p>
</blockquote>
<p dir="auto">I assume you already have the Safari stuff working (in AppleScript). You can then create and send the message using something very similar to the <a href="http://www.alfredforum.com/topic/2354-add-support-for-mailmate-email-client/?p=17560">Alfred example</a> I created for you. You need to do something like the following:</p>
<pre><code>set mailto to create_mailto(safari_subject, safari_url, {}, email, name)
set mailto to mailto & "&send-now=yes"
</code></pre>
<p dir="auto">(And don't tell MailMate to <code>activate</code>.)</p>
<hr>
<p dir="auto">Benny</p>
</div>