title: Drupal 7 SMTP emails not getting delivered from custom modules
body: <p>I have a website built in Drupal 7.34. </p>
  
  <p>I have SMTP authentication module installed and enabled, when I try to test email from SMTP, emails are getting delivered. When I test email, SMTP authentication module executes without any errors. So, its confirmed that, there is no issue with the configured SMTP module. </p>
  
  <p>Following is the test email content.</p>
  
  <pre><code>If you receive this message it means your site is capable of using SMTP to send e-mail
  </code></pre>
  
  <p>I have few custom drupal modules and am using mail hook to send email with/without attachment. Now site was working without any issue will today. All of a sudden SMTP stopped sending emails from my custom created modules.</p>
  
  <ol>
  <li><p>There are no code changes performed for last 16 months</p></li>
  <li><p>No errors or warning or anything logged</p></li>
  <li><p>SMTP is fully capable of sending emails with/without attachment, smtp command line is also working.</p></li>
  <li><p>No patches/updates applied on hosting server</p></li>
  </ol>
  
  <p>I am not able to find root case SMTP failure, I have googled with all possible Drupal 7 email related keywords but no luck. I cant paste each and every link I visited. Drupal 7 documents is also not up to the mark to address this type of bug. </p>