Email server configuration

Issues related to forms.
Post Reply
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Email server configuration

Post by BarryZ »

Hello

I have version 18.0.5. I'm setting up a form for users to fill out and send to me. I'm using the form wizard -- using the Comments template. I also use the built-in PHP form handler to send data to an email address. I'm using my Gmail address.

Yes, I renamed this page extension from "html" to "php". Also, added success and failure pages.

TESTING
I entered a test message and clicked submit. The result says the email was sent, and I am sent to my success page. But, the email is not being received (delivered).

What am I missing or not doing? The website is being hosted on a Windows 2019 server.

Thank you.
User avatar
jerryco
 
 
Posts: 826
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: EMAIL NOT WORKING

Post by jerryco »

Just checking, are you aware that php is working on this Windows server?
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: EMAIL NOT WORKING

Post by Pablo »

Did try the suggestions from the FAQ?
viewtopic.php?t=32967

Did you lookup the error on the server?
What is the error message?
wwonderfull
 
 
Posts: 1255
Joined: Fri Aug 21, 2020 8:27 am

Re: EMAIL NOT WORKING

Post by wwonderfull »

BarryZ wrote: Wed Mar 29, 2023 11:59 am Hello

I have version 18.0.5. I'm setting up a form for users to fill out and send to me. I'm using the form wizard -- using the Comments template. I also use the built-in PHP form handler to send data to an email address. I'm using my Gmail address.

Yes, I renamed this page extension from "html" to "php". Also, added success and failure pages.

TESTING
I entered a test message and clicked submit. The result says the email was sent, and I am sent to my success page. But, the email is not being received (delivered).

What am I missing or not doing? The website is being hosted on a Windows 2019 server.

Thank you.
I know this issue try using an app password everything will be fine. You can get your gmail smtp app password from google app password. Use that password instead of the gmail password in smtp.

Additional Information here viewtopic.php?t=89814
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: EMAIL NOT WORKING

Post by BarryZ »

Pablo -- I'm not upset with you or your responses. I'm just frustrated.

It was my "mis-understanding" that Web Builder Form Wizard in ver 18.0.5 would work "out of the box" without having to install php on a Windows 2019 Server. I expected it to be a more seamless and easier process. I expected that php or whatever else required to send an email would have been included in Web Builder Form Wizard and once the form was created, that the entire process would just work.

PHP is not installed. Does anyone have any simple easy to follow instructions on how to install php on a Windows 2019 server? Please include links to download the correct version of PHP with any other required plugins and/or attachments.

My needs are simple -- Create a customer form for customer to enter data and then have that data sent to me as either a csv attached file or as csv data in the email. Form Wizard works great in building the form. It's very easy to add the fields & field properties. The Success Page pops up and works as expected. The challenge is that apparently Windows and IIS6 does not or cannot send the email with the data. When a user clicks the SUBMIT button, this opens up Outlook (or default email application) on the screen and all user entered data is displayed. The user is required to click the "SEND" button to send the email.

It appears that the only way to automate the send process is to install and configure PHP on the server and then somehow "connect" the form to php on the server. FYI .... It would be great if this process was more clearly explained. Today, one shouldn't have to spend hours looking through forum posts or FAQs to discover how it works. It would be much easier if the first line simply stated that "PHP is required and must be installed on the server for a finished form to work."

Installing PHP involves a lot of work and is above my skill level. It will require considerable time to figure this out. UGH!!!!

Thank you.
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: EMAIL NOT WORKING

Post by Pablo »

I'm sorry to hear that you are frustrated. But, this has nothing to do with WYSIWYG Web Builder. I think this is true for any web building software. Most other website design software does not even work without PHP.
PHP is required to send emails via the server. Without PHP a form cannot send email.
PHP cannot be installed by WYSIWYG Web Builder. This must be done by the administrator of the server.

However, any decent web hosting includes PHP. You should not have to install this yourself.

If your webhost does not support PHP, then you will either need to look for another webhost or use a third party form processing service.
It would be much easier if the first line simply stated that "PHP is required and must be installed on the server for a finished form to work."
It is mentioned on the website "Your hosting account must support PHP and the mail() function must be enable otherwise the described form will not work."
But I understand that not everyone may be aware that PHP is required and must be installed on the server for the form to work properly.
I will make sure to update the instructions with a clear warning about this requirement to avoid any further confusion.
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: EMAIL NOT WORKING

Post by BarryZ »

I am self-hosting my domains on my server.

After having used 3 different hosting companies over the past 20 years, I grew very tired of the typical hosting support answers of "we don't know", or "we don't support that", or "support is busy and will get back with you", etc .....

Given the low price of hardware, one can easily acquire a quality server from SuperMicro. Getting a dedicated, static IP is readily available. I have fiber coming directly into my office to the OHN and then my network is behind a SonicWall Level 6 Firewall. Up/Down speeds are near 300Mps.

I opted for a Windows server because I have a Windows 2019 server OS.

Other than a large reliable power backup generator, I pretty much have everything one would get from a hosting company. My battery backup is a large Anker backup UPS battery with sine wave. Battery can also be charged via portable solar panels. I estimate that my Anker battery can support me for 5 to 7 days before needing to be re-charged.

I also elected to use Windows because with Windows, I was able to install multiple domains on a single IP. Could not find any documentation that said a Linux (i.e. CentOS) could support.multiple domains on a static single IP. Most times, adding additional domains means adding a new IP for each domain.

I use Econ as my DNS provider. Since Econ is also my registrar, the DNS service is included .... no additional charge.

All websites are up and working. Currently, we have 5 domains on this one server. Server is running 64GB of memory with SSD drives. No, I do not have a secondary location (site #2) running a duplicate site incase site #1 dies. Secondary locations are not a free service from any hosting company. Currently, i clone the C drive about every 3rd day, so if the C drive fails, I can swap drives and be back up & running in about 8.minutes. This time is comparable to using VMWARE or Hyper-V backup servers and switching to one of these if the primary went down.

My monthly server costs dropped from $1,500+ to under $100. Dedicated servers in private locked racks are expensive. Plus, most hosting companies do not provide true "firewalls". What they call firewalls, are really just switches. Yes, I know cheaper hosting services are available, but we require dedicated (not shared) servers in locked racks (HIPA security standards).

Now, my last mountain to conquer is adding web forms to my WYSIWYG websites.

If you have any instructions, tips and links to which PHP version I should download & install, please provide.

I really like WYSIWYG. It's a very good website application product. Any help provided will be greatly appreciated.

Thank you
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: EMAIL NOT WORKING

Post by BarryZ »

It's Enom, not Econ -- darned auto correct.
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: EMAIL NOT WORKING

Post by Pablo »

Any recent PHP version (8.x) should work, if setup correctly.
I think that if you can setup a server yourself then installing PHP is not that difficult.

You can download it here:
https://www.php.net/downloads.php

Again I'd like to note that PHP is not specific to WYSIWYG Web Builder.
The reason why WWB uses PHP for forms is because it is installed of most web hosts. So, users usually do not have to care about this.

But please understand that I cannot give support on the server configuration. That is beyond my level of expertise.
User avatar
BaconFries
 
 
Posts: 5324
Joined: Thu Aug 16, 2007 7:32 pm

Re: EMAIL NOT WORKING

Post by BaconFries »

Does anyone have any simple easy to follow instructions on how to install php on a Windows 2019 server? Please include links to download the correct version of PHP with any other required plugins and/or attachments.
Google is a wash with tutorials on how to.Here is just a few examples
Configuring Step 1: Install IIS and PHP
https://learn.microsoft.com/en-us/iis/a ... is-and-php
How to Install PHP on Windows 10 and 11 (with Apache & MySQL)
https://www.sitepoint.com/how-to-instal ... n-windows/
How to Host PHP on Windows With IIS
https://stackify.com/how-to-host-php-on ... -with-iis/
How to install PHP on Windows Server 2019
https://youtu.be/FfDvghUA0WY
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: EMAIL NOT WORKING

Post by BarryZ »

THANK YOU
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: EMAIL NOT WORKING

Post by BarryZ »

I have installed PHP on my Windows 2019 server. It appears to be working, but I will work on this tomorrow. I have attached the instructions I followed and the Windows & PHP settings changes I made.

I would greatly appreciate your comments on:
php.ini file settings
Areas highlighted in light red (pages 3 & 4)
Last item on Page 4 -- What must I do to get WYSIWYG, Windows Server 2019, and PHP together and work. What other steps may I need to do? I ask because in the FAQs on this topic, I read that there was some specific PHP code that needed to be added to either the page or the form .... Sorry, I can't remember what that was.

How do I upload a pdf to attach to this post??

Thank you.
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: EMAIL NOT WORKING

Post by Pablo »

Note that is not a matter of whether PHP works with WYSIWYG Web Builder.
If PHP works in general then it will also work with WYSIWYG Web Builder!

WYSIWYG Web Builder does not need any special PHP configuration.
Of course, if you want to send emails via PHP then you will need to configure a valid mail server in PHP.
However, this is not specific to WWB.

This may be helpful "Configuring PHP for sending mail"
https://netcorecloud.com/tutorials/send ... ete-guide/
User avatar
BaconFries
 
 
Posts: 5324
Joined: Thu Aug 16, 2007 7:32 pm

Re: EMAIL NOT WORKING

Post by BaconFries »

As already mentioned previously as you are self hosting on your own Windows server which initially doesn't come preconfigured for php it requires it to be installed by you the end user. Note this is not related to the use of the software but a server requirement so that any php used including externally and not just just the forms in the software can be processed to be able to send emails etc etc.
Generally most users here are using hosting providers that the server (linux) uses php and is already installed by them so it doesn't require the enduser to setup so that in 99.99% of the time everything works right of the box.

If in hindsight you had mentioned you were self hosting on a Windows Server I would have said ensure the server is running and to type the following into your browser http://SERVER-IP/phptest.php this would have the returned what version of php was installed. Now you have it installed and need to send/receive emails see the following on how to setup emails to be processed on your server using smtp using iis
https://learn.microsoft.com/en-us/iis/a ... -and-above
Note links provided are for information only as it is outwith any help on server configuration you need as unrelated to the software.
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: EMAIL NOT WORKING

Post by BarryZ »

Here is the link to access and download the instructions that I created & used to PHP on my Windows 2019 Server. I'd appreciate any comments or suggestions, or things that I missed.

https://drive.google.com/file/d/19wlfgI ... share_link

Thank you
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: EMAIL NOT WORKING

Post by BarryZ »

Thanks for this information

send/receive emails see the following on how to setup emails to be processed on your server using smtp using iis
https://learn.microsoft.com/en-us/iis/a ... -and-above

But this is the part that confuses me. If I'm using WYSIWYG and using Form Wizard and PHP is now installed, shouldn't the Form Wizard "just work" once installed on a page and that page is renamed with a ".php" extension??

The sole purpose of my form is to collect user registration data and have that data sent to me. I do not need to set up php to handle the send//receive of all emails for all users.

Thanks.
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: EMAIL NOT WORKING

Post by Pablo »

Shouldn't the Form Wizard "just work" once installed on a page and that page is renamed with a ".php" extension??
If you want to collect data via PHP and receive an email from the submitted data , then you will have to setup mail for PHP.
Again, this has nothing to do with WYSIWYG.

Normally, this just works because the web host has set this up. But because you to set up the server (and PHP) yourself, you will also have to make sure PHP can send emails. There is no way to software can do this for you.
Basically, WYSIWYG is just a user of PHP, it does not control how it works.

In other words:
If you want send the form to send emails, then you will have to configure PHP so it can send emails.
Or if you want to store data in a MYSQL database, then you will have to setup PHP so it can access MYSQL.
This is nothing specific to WYSIWYG Web Builder. This applies to all web design software that support (PHP) forms.
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: Email server configuration

Post by BarryZ »

Some additional questions???

1. What is the difference between PHP Mailer and standard mail PHP?

2. my DNS host uses "mail.xyz.com" I do not believe they allow "smtp.xyz.com"
If this is the case, how can I use "mail"? The Advanced Form tab only allows user control if "smtp" is selected (Use PHPMailer).

3. Why port 25 for outbound? Many hosting companies require outbound Port 993 to be used. Port 25 is often blocked.

4. If standard mail PHP is used, then where will the user name & pw be obtained?
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Email server configuration

Post by Pablo »

1. Standard mail() is included with PHP, PHP mailer is a third party script with more advanced options.
2. In that case, you will have to find a mail server that does allow external connections or otherwise setup your own email server.
3. You can use any valid port. Port 25 is just the default for PHP Mailer.
4. This can be configured in the PHP configuration (php.ini)

Note that this all has nothing to do with WWB.
The software has these options so it can be compatible with most web hostings.
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: Email server configuration

Post by BarryZ »

Still having a problem. PHP is installed and is working.

Using a form wizard with no changes. I have the email settings completed. I believe the DNS settings are correct. I have set the success page to my index page and the failure page to my policy page. Both of these pages work on the web site.

Next, I installed the contactus page as a php page and then tested it.

My result -- No Email is being received.

On my results page, I see the message "can't open file".

Please advise.
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Email server configuration

Post by Pablo »

Can you send email with any other PHP script?
If yes, then use the same form settings for WWB.
If not, then there is an error in the server configuration.

If may be helpful to check the PHP error log.

Again, this has nothing to do with WWB.
If you want to setup your own server, then it's your responsibility to make sure it works.
BarryZ
 
 
Posts: 12
Joined: Wed Mar 29, 2023 11:48 am

Re: Email server configuration

Post by BarryZ »

What other PHP script would you like me to use?
User avatar
Pablo
 
Posts: 21570
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Email server configuration

Post by Pablo »

For example:
https://www.tutorialspoint.com/php/php_ ... emails.htm
or
https://www.w3schools.com/php/func_mail_mail.asp
or
https://www.w3schools.in/php/mail/
or
https://www.mailersend.com/blog/php-send-email

But basically, any other script that uses PHP to send emails.
Once you have the basics working, then it will also work with WWB.
User avatar
BaconFries
 
 
Posts: 5324
Joined: Thu Aug 16, 2007 7:32 pm

Re: Email server configuration

Post by BaconFries »

Ok, I'm going to get you to test the following php script on your server. This will either confirm that you have setup mail correctly or not.

Code: Select all

<?php
if(mail('user@mydomain.com','test subject','test message')){
      echo('ok');
    }
else{
      echo('not ok');
    }
?>
Open notepad and paste the code into it. Where it reads user@mydomain.com change this to your own domain, then save as emailtest.php and upload to your server (root). Now, to test open your chosen browser and type
mydomain.com/emailtest.php as previously change mydomain.com to your own domain. If you have email configured correctly, you will get "ok" if not, then it will give "not ok" which means it is not configured correctly.

Please note that this has nothing to do with the software at all but a configuration of the server to which only you can fix it as you are using your own.

After testing please remove this from the server as it is not required for anything else.
WWBman
 
 
Posts: 916
Joined: Fri Jan 08, 2010 6:10 pm

Re: Email server configuration

Post by WWBman »

@BaconFries, just for curiosity I ran your php code and got an OK result.
I then realised I hadn't changed anything, doh!
So I changed the "user@mydomain.com" and got the OK again but also received the test message as expected.
So presumably an email will have been sent to user@domain.com.
User avatar
BaconFries
 
 
Posts: 5324
Joined: Thu Aug 16, 2007 7:32 pm

Re: Email server configuration

Post by BaconFries »

So presumably an email will have been sent to user@domain.com.
The purpose of the code is really to simply check if 'mail' is configured on 'your' server if it isn't then it should return 'not ok'. If there happens to be a 'user' who has used 'user' at 'domain.com' then it's possible
they might have received the email as 'domain.com' actually exists but I doubt it as it wasn't actually them running the code on there side and they would have no way to know who it came from or why.
I admit the code may not be valid or if used as it was just taking from a archive of cide I keep and previously used.
Post Reply