title: CodeIgniter email to spam and from id with gmail not delivering properly
body: <p>I am working with <code>CodeIgniter</code> and trying to send <code>email</code> using <code>CodeIgniter's default email library</code>. I am facing two major issues</p>
  
  <p><b>1. Mail are going to spam folder</b></p>
  
  <p><b>2. Mail ID with domain name as <code>gmail.com</code> is prevent from delivering</b></p>
  
  <p>For the first question, I referenced threads <a href="https://www.google.co.in/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0CB0QFjAA&amp;url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F22433418%2Fwhy-by-codeigniter-email-is-going-to-spam-folder-with-full-information&amp;ei=7n8vVamFJcPhuQTFtID4Aw&amp;usg=AFQjCNFzS3Q61Ar0wmMpH5sv7pRwy7Wn8w&amp;sig2=pZZiKvaVwwJmHxOYRo9L_w&amp;bvm=bv.91071109,d.c2E" rel="nofollow noreferrer">Question 1</a>,<a href="https://stackoverflow.com/questions/12714969/codeigniter-mail-to-going-to-spam-any-solution">Question 2</a>,<a href="https://stackoverflow.com/questions/11843123/sending-emails-with-codeigniter-received-in-junk-mail">Question 3</a></p>
  
  <p>But none of the above helped me. </p>
  
  <p><b>Can I use any custom header for this purpose?</b></p>
  
  <p>If there is a proper solution other tha the above, Please help me..</p>
  
  <p>And for the second question, is it a server related issue? because it delivering mails from <code>someonee@hotmail.com</code> but not from <code>someone@gmail.com</code>.</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Thanks in advance</p>