createAttachment = (file) => {
  const {originalname, fileName, mimetype, contentType, content} = file;
  const attachment = new Attachment();

  attachment.setFilename(originalname || fileName);
  attachment.setType(mimetype || contentType);
  attachment.setContent(content.toString('base64'));

  return attachment;
}
Normalises attachment files retrieved from file system or parsed raw email

@param {Object} file The file object returned by file system or parsed email
@return {Object} A Twilio SendGrid Attachment object with the file data