Bug Report from Johnny_Solberg - Email form not sending email

OS info

  • Operating System : Windows 10.0.18363
  • Wappler Version : 3.5.4

Problem description

Email form not sending email, and only response is a serverer error 500

Steps to reproduce

  1. Creating a mailer instant
  2. Creating a Send mail, using my ordinary smtp server
  3. Server connect form using the above, when submitted I get a server 500 error. I’m using ASP.net as server model. Is that the problem again?

When trying to open the server action in browser i get a Bad Request message

report_2020-10-18_22-53-20.zip (355.7 KB)

What’s the exact error returned by your server action? Just follow the tutorial and see what does it return exactly:

The debug log is only required for issues in Wappler, not for issues with your site in the browser.

I have tried all that, and the error message is still just “Bad request on” opening the server action in a browser , and server error 500 in google developer tools, it hangs on the send data command.
this.xhr.setRequestHeader(‘accept’, ‘application/json’);
try { this.xhr.send(data); }
catch (err) { this._done(err); }

I have six other sites on the same server, all made in Deamviewer, and they send mail with no problems at all. So my question was really; is this an asp.net problem? As the one I had about a week ago with server connect global databases not working in asp.net. If so I need not waist anymore time trying to make it work, but just make this small site in Dreamviewer instead, I have a deadline on monday from the costumer

The error is in ASP.NET indeed, but we need the actual error. What is the actual response from the server? Easiest it is to open the Server Connect call directly in the browser. You maybe need to configure the server to show the error if it doesn’t show it.

The server is set to display error messages, but I only get this:

This is server connect page
This is the actual respose page for testing
This is my contact_form.json:
{

“meta”: {

"options": {

  "linkedFile": "/contact-copy.html",

  "linkedForm": "contact-form",

  "autoSync": true

},

"$_POST": [

  {

    "type": "text",

    "fieldName": "useremail",

    "options": {

      "rules": {

        "core:required": {

          "param": ""

        },

        "core:email": {}

      }

    },

    "name": "useremail"

  },

  {

    "type": "text",

    "fieldName": "phone",

    "options": {

      "rules": {

        "core:required": {

          "param": ""

        }

      }

    },

    "name": "phone"

  },

  {

    "type": "text",

    "fieldName": "subject",

    "options": {

      "rules": {

        "core:required": {

          "param": ""

        }

      }

    },

    "name": "subject"

  },

  {

    "type": "text",

    "fieldName": "message",

    "name": "message"

  },

  {

    "type": "text",

    "fieldName": "username",

    "options": {

      "rules": {

        "core:required": {

          "param": ""

        }

      }

    },

    "name": "username"

  }

]

},

“exec”: {

"steps": [

  {

    "name": "mail",

    "module": "mail",

    "action": "setup",

    "options": {

      "host": "smtp-relay2.webhuset.no",

      "useSSL": true,

      "port": 587

    }

  },

  {

    "name": "",

    "module": "mail",

    "action": "send",

    "options": {

      "instance": "mail",

      "subject": "{{$_POST.subject}}",

      "fromName": "{{$_POST.username}}",

      "fromEmail": "{{$_POST.useremail}}",

      "replyTo": "{{$_POST.useremail}}",

      "toName": "info@carera.no",

      "toEmail": "info@carera.no",

      "body": "{{'Mobil: '+$_POST.phone+' Melding'+$_POST.message}}",

      "attachments": []

    },

    "output": true

  }

]

}

}

I tested your page and it seems that your server could not connect to the remote host, the connection was refused. It looks like a firewall is probably blocking it.

The actual error message from ASP.NET.

No connection could be made because the target machine actively refused it

That would be true if one tries from outside the server farm, as this mailserver only accepts request from internal ip addresses.

Med hilsen/best regards

Johnny Solberg