I think the error message you get can be associated with sending to secure email fron a domain with no security certificate so perhaps sending without ssl may be necessary for testing from local server.
Worth a try.
Create an API action with an email inside and run it directly in the browser
Sorry, doing this on phone so detail is difficult in image.
Is output checked on your email stage?
It was not. I corrected that, but am still getting the same error.
Hi Aysling,
How are you calling the API register
? Are you submitting a form on the front-end?
Yes. All the data is being added to the database correctly and I'm being redirected to my homepage after submission.
OK, at computer
(1) create an api action like this (substituting correct email addresses of course) then run directly in browser (2) and see if.
- any output
- if you receive the email
I did not receive the email. Did you mean output in Wappler, and if not, then where? I'm receiving the same error in DevTools as before.
After replacing the mailer, sender and recipient details in the api, click on the arrow marked as 2
in Brian's screenshot. This will execute the api action and open it in local browser.
This will test whether the email settings are correct.
{"form":{"first_name":"This field is required.","last_name":"This field is required.","email":"This field is required.","password":"This field is required."}}
That message tells me you are running register, please try the sample i illustrated and this does not need inputs
There are two steps in this case.
One is submitting the registration form, which you mentioned is working as the details are being added to the database correctly.
Second step involves using the form input or saved information and adding this information in the Send Mail
step in the api action.
So, to test what Brian has shown in the screenshot, add a new api with Send Mail step and run it (Open in Browser).
Oh, sorry, you meant a totally new mailer, not redoing the info on the register.json. Sure, let me set that up.
yes, this will confirm if the issue lies with the email setup or elsewhere
Just brackets {}
Give me a few minutes to set some tests up on email sender
OK, i have setup a test setup and am also seeing issues sending from localhost via production SMTP server which I have not experienced before.
Production works perfectly
Going to need some time to do extended tests.
Can you manually upload the new test API i outlined
and test in production environment by running in browser to see if email received
Thank you for the help so far! I just realized the time and have to go to bed. I set up a production server in the Community Web project, tried to manually upload and hit the little button to open it in the browser, but got site can't be reached. I'll troubleshoot tomorrow. Let me know if you figure anything out!
Ok, the error was related to the URL on the remote server, I did get output once I figured out where the file was stored.
{
"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.