Wappler Version : 3.5.5
Operating System : Mac
Server Model: NodeJS
Database Type: MySql8
Hosting Type: AWS, Docker.
Expected behavior
I should be able to use the global mailer setup, and simply add a sendmail step to a server action.
Actual behavior
What actually happens?
Two different types of errors. If I use only a 'Send Mail' step, using the global Mailer then I get a 'setMailer is not defined' error:
{"status":"500","message":"setMailer is not defined","stack":"ReferenceError: setMailer is not defined\n at App.getMailer (/opt/node_app/lib/core/app.js:124:13)\n at App.send (/opt/node_app/lib/modules/mail.js:47:26)\n at App._exec (/opt/node_app/lib/core/app.js:384:57)\n at App._exec (/opt/node_app/lib/core/app.js:355:28)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)\n at async App.exec (/opt/node_app/lib/core/app.js:324:9)\n at async App.define (/opt/node_app/lib/core/app.js:314:9)"}
If I add a Setup Mailer step before hand in the server connect I get the following error:
code: "ESOCKET"
message: "connect ECONNREFUSED 1xx.xxx.xxx.'
How to reproduce
Setup a SMTP Mailer Step, then add a send mail step to a server action. I'm retrieving $_POST values from the page, and sending to our generic email address.
Hey @patrick - I updated the app.js file from another, later post here.
But now I get this error:
{"status":"500","code":"EENVELOPE","message":"Mail command failed: 550 Unauthenticated senders not allowed","stack":"Error: Mail command failed: 550 Unauthenticated senders not allowed\n at SMTPConnection._formatError (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:774:19)\n at SMTPConnection._actionMAIL (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:1543:34)\n at SMTPConnection.<anonymous> (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:1025:18)\n at SMTPConnection._processResponse (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:932:20)\n at SMTPConnection._onData (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:739:14)\n at TLSSocket.SMTPConnection._onSocketData (/opt/node_app/node_modules/nodemailer/lib/smtp-connection/index.js:189:44)\n at TLSSocket.emit (events.js:315:20)\n at addChunk (_stream_readable.js:295:12)\n at readableAddChunk (_stream_readable.js:271:9)\n at TLSSocket.Readable.push (_stream_readable.js:212:10)"}
Not sure if this is related, but I’ll just throw out here that Sendgrid recently deprecated logging in via username and password – it now requires an apikey. You use “apikey” as the username and the apikey value in password.
Sorry, unrelated, switched from SendGrid to Postmark - sooo much better. Deliverability rates increased nearly 20% and almost instant email to inbox time. Currently using an API step rather than the Send Mail component. No bugs. Also using Postmarks template feature so let them handle the HTML email side of things.
Thanks @max_gb i've heard the same, and to be honest - SendGrid's support has always been horrible. Looking forward to the switch, we'll use the API too when we make it, but for now still using SMTP with sendgrid.