Email Attachments


I’m trying to enable the users to send attachments through a contact form. I’m not sure what I need to put in for the file content or path? I’m using gmail as the outgoing server, if it helps.

  var contactForm = $(e.currentTarget),
  attname = contactForm.find("#file").val().replace(/C:\\fakepath\\/i, '');

  var attachments = [];
    fileName: attname,
    content: ???

      var email = {
          to: '',
          from: '',
          subject: 'New message from contact form',
          text: text,
          attachmentOptions: attachments