title: Which hostname is required to send email to a user through a website created with Google Apps?
body: <p>Our website was created with Google Apps.</p>
  
  <p>My website URL is <code>http://mydomain.com</code>, which is pointing to <code>http://sites.google.com/a/mydomain.com/</code>.</p>
  
  <p>I want to send email to a registered user.</p>
  
  <p>I am using the Apache Commons jar to send mail to the user.</p>
  
  <p>I get this error message:</p>
  
  <pre><code>Sending the email to the following server failed : http://mail.google.com/a/mydomain.com:25
  </code></pre>
  
  <p>I used <code>smtpPortAddress=25</code> &amp; <code>hostName=http://mail.google.com/a/mydomain.com</code>.</p>
  
  <p>I am not spending money on email server setup, so I want to send email through our website.</p>
  
  <p><b>Which hostname is required to send mail?</b></p>