Send HTML form email from Local MIAB Web Server

Been using MIAB for about a month, all working great. I have one question, how do I setup things so that I can send an HTML form via email from the local MIAB box web server that is hosting one of our domains too? I have the HTML form posting to php processing file, but I get a 405 Not Allowed error from nginx when submitting the form.

Thanks!!

I am not much of a PHP person, That said can you offer more logs/error messages?

Do you have another server to test the form from to be sure that the issue isn’t with the form itself?

No issues sending mail from other servers through MIAB, I will elaborate a little more above.

Let me explain more, I have no issues sending mail from other servers via SMTP, so no issues with MIAB that I am aware of. The question is more I guess, since sendmail is not installed with Ubuntu/nginx/php installed with MIAB installation, can I install sendmail and not cause any issues with MIAB since both are running the on the same box and I want to be able to send mail from HTML form on website hosted on MIAB box through MIAB, or how with the base install should one go about sending mail from the web server on MIAB box correctly so as not to cause any issues with the mail server or anything else on this box?

I would recommend against it. MIAB installs postfix, use that instead of sendmail.

Any customizations are likely to break MiaB or the next update of MiaB will break your customizations.

Postfix is a sendmail-compliant MTA, so almost anything that uses sendmail can also use Postfix, which includes the PHP mail() function.

If you install sendmail to MiaB, you will likely break MiaB.

MiaB is not configured to support websites requiring anything other than HTML.

It seems like you are trying to use MiaB for something it is not intended for, so you are unlikely to get much in the way of support from the MiaB devs or community. MiaB is intended to be a very simple and straightforward mail server for personal or SOHO usage.

I understood this.

So back to my original question … have you tested the form to insure that it is functioning properly?

Absolutely NOT as they are both MTA’s.

Which leads again to the question of IF your form works properly … do you have the sending user properly configured?

This is a very valid point. Most likely your form and website (if it is more than a simple static website) should really be hosted somewhere else as this is not the intended use case for MiaB. That said, it all goes back to the form and if it is properly functioning - which is why I asked if there were any logs or error output that could potentially shed some light on what is going wrong, because with errors, there are going to be messages and logs.

Same form being used on other LAMP installs and it sends mail through MIAB just fine. Just trying to setup plain HTML file website on MIAB box and make things simpler to manage rather than have another web server with just plain HTML files on it, no JS or anything else, just local plain files being hosted.

You said earlier that the form is sending through SMTP from the other servers:

Yet, you are using phpmail:

So, which is it? Either have your form use SMTP, or provide some logs of the error so that it can be determined what is going on.

Thanks, I have gone another direction with this functionality that I was trying to accomplish so please consider this topic closed from my end. Thanks again!