title: AWS simple email service hangs at sendRawEmail
body: <p>I wrote below nodejs function to send email using AWS SES.
  the same code successfully sent emails few times but after that code hangs at <code>ses.sendRawEmail</code> i tried increasing timeout and memory allocation but still gives me Task timed out after 60.01 seconds</p>
  
  <pre><code>function sendMail( statusJSON){
  
      var aws     = require('aws-sdk');
  
  // Edit this with YOUR email address.
  var fromEmail   = "xxxxxx";
  var toEmail   = "xxxxxx";   
  
  // Instantiate SES.
  var ses = new aws.SES();
  var ses_mail = "From: 'Service Monitor' &lt;" + fromEmail + "&gt;\n";
  ses_mail = ses_mail + "To: " + toEmail + "\n";
  ses_mail = ses_mail + "Subject: service status: RED\n";
  ses_mail = ses_mail + "MIME-Version: 1.0\n";
  ses_mail = ses_mail + "Content-Type: multipart/mixed; boundary=\"NextPart\"\n\n";
  ses_mail = ses_mail + "--NextPart\n";
  ses_mail = ses_mail + "Content-Type: text/html; charset=us-ascii\n\n";
  ses_mail = ses_mail + JSON.stringify(statusJSON) +".\n\n";
  ses_mail = ses_mail + "--NextPart\n";
  ses_mail = ses_mail + "Content-Type: text/plain;\n";
  ses_mail = ses_mail + "Content-Disposition: attachment; filename=\"statusJSON.txt\"\n\n";
  ses_mail = ses_mail + JSON.stringify(statusJSON) + "\n\n";
  ses_mail = ses_mail + "--NextPart--";
  
  var params = {
      RawMessage: { Data: new Buffer(ses_mail) },
      Destinations: [ toEmail ],
      Source: "'Herald Service Monitor' &lt;" + fromEmail + "&gt;'"
  };
  ses.sendRawEmail(params, function(err, data) {
      if(err) {
          console.log(err);
      } 
      else {
          console.log(data);
      }           
  });
  </code></pre>
  
  <p>please share your thoughts</p>