Server Error 500 when trying to send email

So the current situation is:

  1. Website working
  2. Email works on production
  3. Emails not being sent from localhost but also no error message is generated when it runs and everything else in tegistration seems to function?
1 Like
  1. Yes
  2. I still haven't received an email
  3. Yes

(just in case... suppose you checked your spam)

1 Like

Can you confirm that the sender smtp email is an email on your site domain and not a 3rd party servervas sometimes tjis can trip security restrictions.

Have you tried running the testmail action i indicated yesterday on the production server?
Did it work or not?

Good thought, but I have. in:all for the subject of the email and the domain name. No results.

It is an email on my site domain, yes. I did run the testmail action and here are the results:

{
"name": "",
"module": "mail",
"action": "send",
"options": {
"instance": "SMPT",
"subject": "test",
"fromName": "Me",
"fromEmail": "noreply@myurl.com",
"toName": "Me",
"toEmail": "myusername@gmail.com"
},
"output": true
}

Both myusername and myurl are placeholders for the actual URL and email. As of right now, I have not received an email.

Actually, checking the email on my domain, it does say something about Roundcube. I'm not sure if that makes a difference.

I just checked the email deliverability settings for my server via cPanel, and it says valid.

Hi Aysling

The results you show are NOT the output of the API action, they are the contents of the API file.

You must run the testmail API action in your browser to get the output.

Please do this

Ah, ok! That didn't work the night before, I thought it was because the url it brought up was strange. I get a site can't be reached error and the following url: https://mydomain.com:8100/api/UserAction/testmailer

I uploaded, but didn't publish the site to my production server, which already contains another website. I'm going to adjust some settings, publish, and check again.

1 Like

Not sure the :8100 should be there, thats normal for localhost but very unusual for production.

Check your project settings, may need to edit the production URL to remove that

1 Like

I did, same result.

When trying to publish, I got a database connection error. I realized that the database settings I'd used were for another website on the same server and made adjustments. With the target set to production, it just says an error has occured, but won't let me click the button for Database Conenction on the Database Manager tab.

When I test the connection in the Production Target tab, everything works, but I think it's only testing the FTP connection, not the database one.

Th test file does not use any database access so that probably shouldn't stop it working.

when you say same result, please clarify

Yes, that's seems to be a bug i need to report. I temporary fix is to change the project settings, production target usage tab from Production to development then you can change settings

1 Like

By same result above, I meant I was still getting the unable to reach site error after the change to remove 8100 from the URL.

Ok. I edited the database settings, hit publish, and got a message that said upload was sucessful in the console but an error saying it wasn't completed in an alert-type warning.

Now I'm getting a 500 internal server error, but am connecting to the site.

Working on troubleshooting the 500 error, I think I know what's causing it.

It seems to be trying to use an incorrect url. When I put the correct one in the browser, it'll bring up the contents of the API file. Not entirely sure what to try.

If you mean it is showing the contents of the JSON file then that probably means the node application is not running or is misconfigured, this should never happen (i assume you are using node)

Not sure of the bluehost specific implemetation fo noide via cPanel but you may want to check out

and

Gone for rest of evening now

1 Like

If you need to generate a dummy email that receives emails, use mailinator:

I never even thought of that. I think Bluehost doesn't offer Node.js without a VPS or higher service, which is far out of my price range. I'll contact customer support to be sure.

Can I adapt the tutorial to php?

Other than layout/content pages which are not supported by PHP, most are transferable.

Why not grab a $1 a month orangehost account (US based) and follow my tutorial on setting up node.

1 Like

Should be exactly the same with php. I do find it won’t work from my local MAMP server. I have to push love to test it.