generally using the “Email via web server” is preferable as it’s pre-configured by the web host (usually); the custom SMTP server is usually a solution to revert to if the mail via server can’t be made to work
the from email address in a contact form is not your visitor’s email address, it’s never going to be, this is because the address is checked by spam filters against the servers allowed to send email for the sender’s domain, so for example if you were to put a @gmail.com address in the from, your server would certainly not be allowed to send server on behalf of gmail, so it would be instantly deleted as spam; so in the from email address it’s usually safe to put something like nobody@yourdomain.com (with your actual domain there)
in the custom SMTP server case, the username and password are authentication to the SMTP server, so they are only about what how the SMTP server is configured; it’s often the case that you use the same SMTP server the “to” email address is delivered do, and sometimes it can even be the it has the same password, but it’s not always the case
yes you can conceivably use the same from and to, as long as the from is @yourdomain.com
the 500 internal server error comes from doing what? if it’s with the thank you page (the PHP page doing the form delivery), does ipower support using PHP?
the “email via web server” uses a PHP function called mail(), which is designed to deliver email through the web server’s mail configuration; the custom SMTP server setting contacts a different mail server (SMTP, simple mail text protocol, is the underlying protocol used by internet mail)
Ultimately you’ll probably have to get some information from ipower, such as whether they support PHP and whether their PHP configuration allows for using PHP’s mail() function, so that you can use “email via web server”, or if they don’t, then what’s the preferred way for your website to send a contact form.
I have two different emails@domain.com in the from and to. The user and password are associated with the to email. PHP version is 7.4.10 so I don’t think that is the issue. I have mostly been trying to get the smtp to work but have tried the web server way too and that isn’t working either.
Once I click send button I get an internal server error. Per developer tools Network tab:
Request URL. https://fakeinfo.com/rfq-redirect.php
Request Method POST
Status Code. 500 Internal Server Error
Remote Address 66.xx.xxx.x:xxx (deleted some info)
Referrer Policy. same-origin
It kind of seems like I am missing something entirely. If I am publishing at the time of trying to click the button would that also cause an issue? Thoughts?
After some back and forth with @duncan I was able to get this to work (thanks so much Duncan)!
I am using ipower which has its own php.ini file. My php.ini file allows asp_tags which is basically obsolete. I had to comment out the third line below
Another clue was that I was getting an internal server error (when going into developer tools it said it was a 500 error).
Another note, I had to also comment the asp tag line out on both the main domain and sub domain I am using. I was also able to get the form submission to work with both via web server and via smtp (although there is more php.ini code I had to replace for the smtp to work).