Meteor Mail drops attachment!


#1

Hey everyone, I am trying to send a very basic email attachment. I have been receiving email when the call is executed, but my attachment is always dropped. The recipient email is Gmail currently. I don’t know if my code is incorrect or if my syntax is incorrect but I receive all but my attachment. I looked up mail-composer documentation and I seem to be conforming to those standards. Where am I going wrong?

Here is the server code:

Meteor.methods({
    sendEmail: function (to, from, subject, text,attachments) {
        check([to, from, subject, text], [String]);
        this.unblock();

        Email.send({
            to: to,
            from: from,
            subject: subject,
            text: text,
            attachments :[
              {   // encoded string as an attachment
                  filename: 'text1.txt',
                  contents: 'aGVsbG8gd29ybGQh',
                  encoding: 'base64'
              },
            ]
        });


    }//End SendMail funct.
});//End Method

#2

Meteor uses mailcomposer 0.1.15. There is no encoding option in that version.