Banging my head against the wall with Mailer on production

There could be a possibility Google is just blocking your website's IP address (which is shared across all customers on the same node) due to some other customer's "abuse".

As this is an emergency, try using a specialized SMTP service, like this one:

I've tried different smtp services and they all work on localhost, not once I put it on orangehost and it was all working before. I'm going to try a different host if I get a chance tomorrow and see if it make a difference.

Found this but it's old and I'm not using a proxy. node.js - Sending an email using nodemailer not working on remote but working in local host - Stack Overflow

What if you restore an old version of the website through cPanel? Just to check if it's a Wappler issue

I had made a full backup using Cpanel, but it didn't seem to save everything. I had to go through and upload photos again cause somehow all the new ones I had uploaded were not included in the "full" backup. It's just been one of those days.... :face_exhaling:

Are you sure your issue is not exactly as described here? javascript - NodeMailer Invalid Login - Stack Overflow

Yes I've triple checked all the settings. They work on localhost, I get the error on production. Same exact mailer with same settings. Brad did a quick test with Node on his Orangehost and was able to recreate my issue. I'm going to try a different host when I get a chance. Probably later today after this market we're attending.

Could be the host then, see the last reply here:

https://www.reddit.com/r/node/comments/13p0fif/nodemailer_always_says_failed_to_authenticate_on/

The solution actually had nothing to do with node which is the unfortunate part, the server provider I was using, a2, prohibited any type of emails being sent from their servers. I then migrated everything to netlify and it worked immediately. Hopefully this helps! Good luck!

Not sure that's it, cause it was working perfectly until yesterday when I uploaded changes.

Well if the same files are working locally and not working on the server there are two options:

  1. Files locally and on the server are not actually the same
  2. There's an issue on the server

I've ruled out number 1, trying to look at everything, including DNS on the server now.

@Hyperbytes, have you had any issues with nodemailer on Orangehost?

Sorry,been out. Will do some tests now and report back.

No problem, don't go out of your way. Only if you have time. I may have narrowed it down to SSL. I'll explain later when we're done with this market. I have a work around working for now.

working perfectly with these settings

Just tried to set up a new production target and having a nightmare installing NPM dependencies, just getting errors all the time

Before I deleted this node app to start over to see if that would fix the smtp issue, I was getting errors all of a sudden trying to run NPM install as a trouble shooting step. That was another reason I ended up starting from scratch. When I created the new node app, I did get a "package.json" file not found error. I had to upload the package.json file directly to the nodevenv/nameofyournodeappfolder/18/lib folder and then NPM install worked.

As for the smtp mailer, after a lot of trial and error with different smtp settings and providers, I finally found one that worked. I signed up for a free account with SMTP2GO which gives you 1,000 emails a month. These are the available settings for their smtp.

These are the settings that worked. Username and password annotated out of course. If I turn on the SSL setting, I get the auth error though. I haven't tried to see if using the gmail settings again without SSL would work. Since the site is live and working, I don't want to fix what isn't currently broken haha