Sending emails via smtp


i’m struggling with sending emails via sparkpost’s smtp_injection from a deployed application.
on my dev machine everything works fine and emails are sent as expected.
but when the app is deployed via mup Email.send({...}) throws an exception


TypeError: this is not a typed array.
    at Function.from (native)
    at LastNewline._flush (/bundle/bundle/programs/server/npm/node_modules/meteor/email/node_modules/node4mailer/lib/mime-node/last-newline.js:28:26)
    at LastNewline.<anonymous> (_stream_transform.js:118:12)
    at LastNewline.g (events.js:260:16)
    at emitNone (events.js:67:13)
    at LastNewline.emit (events.js:166:7)
    at prefinish (_stream_writable.js:471:12)
    at finishMaybe (_stream_writable.js:479:7)
    at endWritable (_stream_writable.js:491:3)
    at LastNewline.Writable.end (_stream_writable.js:456:5)

my dev machine is running latest meteor on win10, then deploying with latest mup to a debian 8 machine.

any help would be greatly appreciated :slight_smile:

1 Like

I am having the exact same issue (however with Mailgun). Have you managed to resolve this?

I’m pretty sure this is the same issue everyone else is having. Try this:

meteor remove email

meteor add email

The email package was corrupted somehow. Removing and installing it again should do the trick.

unfortunately no, i weren’t able to resolve it :frowning:

thanks for your help @methodx, i’ve already tried that. Actually i’ve already setup the whole project from scratch on a different dev machine (meteor create, adding all packages, moving my files, …) but the error persists.

That is really odd… Have you tried reverting back to email@1.2.0?

not so far, as some other packages (especially accounts-password) depend on the latest version of email.
but i will try to setup a simple testing app for this.

Either Meteor 1.5 or email 1.2.3 seem to have resolved the issue. i just updated and emails are beeing sent again :slight_smile:

thanks to everyone involved !