0
我想發出一個非常基本的電子郵件附件。電話執行時我一直在收到電子郵件,但我的附件總是被丟棄。收件人電子郵件目前是Gmail。我不知道如果我的代碼是不正確,如果我的語法不正確,但我接受所有,但我的執着。我查閱了郵件撰寫者的文檔,並且似乎符合這些標準。我哪裏錯了?流星郵件附件下降
這裏是服務器代碼:
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