title: Using curl to send email
body: <p>How can I use the curl command line program to send an email from a gmail account?</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>curl -n --ssl-reqd --mail-from "&lt;sender@gmail.com&gt;" --mail-rcpt "&lt;receiver@server.tld&gt;" --url smtps://smtp.gmail.com:465 -T file.txt
  </code></pre>
  
  <p>With file.txt being the email's contents, however, when I run this command I get the following error:</p>
  
  <pre><code>curl: (67) Access denied: 530
  </code></pre>
  
  <p>Is it possible to send an email from an account that is hosted by a personal server, still using curl? Does that make the authentication process easier?</p>