The TRUTH about FORMS

Hi guys,
Not working forms are a common issue on the forum. Although this is not a blocs issue, many users are fighting with this. The Idea of this post is to give a stop to this so the ones who are not great on this area could focus on giving our clients a better service.

We know for sure that in order to work you should use a matching site adress. For example: if your site is yourdomain.com, you should use @yourdomain.com adresses on your submit. I always do that.

But In my case I only get working blocs forms with ONE hosting provider. All my clients who have other provider can´t receive mails. Godaddy, or Amazon (AWS) or any other won´t work. My solution is always telling them to switch to my hosting provider and that works. The question is why?

I am still finding what should I tell to the hosting provider to make the form work:

-Please Godaddy, I have a simple php form and I need you to enable “something” in order to make it work. Otherwise I cant receive mails.

-Ok, client. I will enable “that” and it should work!

Boom, Magic!

NOPE. Instead I get answered that by security reasons they have disabled “I don´t know what” and I have to use other method, or that I have to config my site, or any other evasive. Never taking the time to offer a solution or explaining why it doesn´t works. Most of this cases providers have a Cpanel.

Is there anyone who exactly knows wich function, parameter or feature must be enabled on the server in order to make the form work?

Thank you very much guys

1 Like

I have used Blocs with various web hosts and never had a moment of trouble on forms. As a matter of interest are you using cPanel or some alternative?

2 Likes

@chicuelo Many web hosts are insisting that form submission are only sent via SMTP - not the PHP sendmail function. Some even go to the trouble of disabling, or turning off PHP sendmail. Whilst it is usually possible to turn it back on again through cPanel, your host will most likely give you grief if you do.

Something that Blocs could do, to make life easier for those being troubled by this trend, is to offer another form sending option that uses SMTP. Below is a screenshot from another website app that does precisely this.

This option allows forms to be sent as normal emails via an email account set up on the server. Note to @Norm If an option similar to this could be incorporated into Blocs, our problems would be over.

3 Likes

@Flashman My current provider (from Argentina) is cpanel based. When I started using blocs, it didnt worked untill I contact them and from there all the domains I registered worked.

But I have some clienents that have other providers (Amazon or Godaddy) that did not worked. I know godaddy is cpanel based and I asked for support but they refused to configure the server so I have to ask the client to switch to my provider. Now its working without flaws.

@hendon52 Now I understand a bit more about this issue and could ask other providers to allow php functions in order to work.

I agree with you, this must be a blocs feature. Blocs claims to be a no coding needed app but forms are present in the 99% of the sites people create and the hardest feature to master for a non programmer is a form. If there is method to achieve this it would be great to have this capability built in the app.

Thank you for your response, this really helps the comunity and hope @Norm include this in future updates

GoDaddy seems to be the source of so many problems. From previous posts on this subject I know there have also been cases of user error like trying to send from a gmail address. For me, sending email through Blocs has always been totally reliable with all the web hosts I have tried, so I wondered if others were using non standard control panels or perhaps some ancient PHP version.

From what @hendon52 is saying it appears a number are now being tricky over using PHP, so from that perspective my concern wouldn’t be so much for the site I might build next month but all the sites done previously if my web host suddenly changed their requirements and there is no option in Blocs to offer an SMTP alternative.

2 Likes

Just a follow up thought. For the sending from address added inside the Blocs form field I always put the cPanel login username @ the name of the server, as provided by the web host when you sign up.

This seems to sidestep any issues over how the email address has been set up on the sever and I discovered this by accident after migrating a site to a new web host when it defaulted to this before I had a chance to change any of the form settings. Seeing that it worked I’ve adopted the same procedure successfully on every site since.

1 Like

Hi @Flashman, can you kindly give an example or show a screen shot.

The primary reason that many of the larger and more well known hosting companies are starting to depreciate the PHP sendmail function is due to email abuse. Typically, abuse falls into two basic categories - weak scripts that use the sendmail function, or exceeding mail quotas that can lead to spam complaints and IP blocking. In the first category, a weak script may be compromised by spammers and the script itself becomes a spam gateway. This, in itself can cause mail quotas to be exceeded without the knowledge of the domain owner. In the second category, website owners may be using a script for mass-mailings to their own opt-in lists or more general lists acquired from list brokers. In any event, such activity tends to eat up shared resources on shared hosting accounts and can easily lead to the common server IP address being blocked by other servers around the world. So, it’s probably easy to understand why some hosting companies are forcing the use of SMTP, as this route requires a correctly configured, password protected email account through which to route emails. By doing this, if an email account on a shared hosting starts exceeding limits, the host can issue a denial of service notice and temporarily (or permanently) disable the offending email account. Clearly, the aim is not to fustrate domain owners, but to protect them from being unfairly black listed. A typical shared server may have thousands of domains - it only needs one of them to cause the main server IP to get blocked, and everyone suffers as a result.

I’ve got a number of clients who have faced this problem. It usually happens with larger web hosts in Europe, particularly France and Belgium, but I’ve also seen it increasingly in Asia. When this becomes an issue, I simply don’t use the standard blocs email generated script (as good as it is). Instead I use the Tectite Formmail script and simply point the Blocs webform to the URL of that script. The good thing about the Tectite script is that it uses the standard PHP sendmail function by default, but it can also be easily configured to use SMTP using the Pear settings. This is how the configuration lines look:

Once the script has been edited to use these settings all your forms will be delivered by the SMTP email account instead of via the PHP sendmail function.

This script option also gives you a number of other useful features that limit what can be entered on your forms and even reject emails that look like spam. You can also configure where your responses get delivered on a form-by-form basis (single or multiple email addresses) and you can even have each form in your site redirect to different success or failure URL’s. This is done through the use of hidden fields on your form. If you feel uncomfortable about including recipient email addresses in a hidden field on your form, you can create a simple ini file that uses an alias and an email address. You would then use the alias in your html form instead of a real email address. This is how this option works:


To add a hidden field in blocs, just add a standard field without a label and change it to Hidden. You would then use the custom attributes section to add the “name” and “Value” elements of the field

So, until such time as Blocs has an SMTP option, the tectite script is a safe and reliable work-around that gives you many more functions and options than the standard Blocs script. It’s totally free (unless you want the developer to configure the script for you) and it’s been around a long time.

NOTE: Don’t confuse this script with the other Formmail Script from formmail dot com. Use only the Tectite script - the other one has a few security issues reported over the years - it may be a good script, but I wouldn’t chance it.

2 Likes

Blocs has nothing to do at handling php or smtp protocols. It just renders forms with conventional code.
Php mailer is the app that manages the requested forms. It’s the job server side. I think you have an issue with your provider not with Blocs.
It looks like an authentication issue as i see you’re fine sending email on port 25 which is the old standard smtp port (with no SSL).
Personnaly i use Blocs forms which are handled in Python in the backend, it works for email sending.

Thank you @hendon52 for taking the time to explain this and sharing Tectite info to us.

@Jerome With the greatest respect, blocs does have something to do with handling php protocols because blocs creates the php script that gets uploaded to your server to process the form submissions. Whilst the script works very well on servers that have the PHP mail option enabled, it does not offer a solution for sending the form via SMTP on servers where PHP Mail is disabled. It does, however, offer a broader solution in so far that the blocs form script can be ignored altogether by simply having the form direct to a URL of an alternative form processing script. For many people, the two blocs solutions are sufficient for most needs. However, some people may have difficulty in configuring an alternative script and would be better served by having the blocs generated script include an option for SMTP. That is all that is being asked for - no one is criticising blocs for not having the option, we would just like to see it as a possible addition in the future.

I am hosting reseller at a small provider in munich and never had problems with php mailer. I have never had any problems at all with this provider.

I have stumbled across the same problem. I switched form hosting provider and the problem was solved; the old hosting provider lost 35 customers in one click…

1 Like

In the send to field put the client’s email address where you want the email to go. In the from field check your web hosting details for the cPanel login. You will have a username and a server name. You can use those and it always works for me.

In his example the address is too long to show completely in the Blocs window but you should get the idea. Just check your cPanel login details.

Screenshot 2021-06-23 at 08.21.39

One caveat is that this address will show up on received emails but those go to the client anyway. If somebody did try using them to enter cPanel they would still need the password and I would always suggest setting up 2 factor authentication anyway.

4 Likes

Please @Norm It would be awesome if we had a SMTP option in Blocs.

5 Likes

HI @Norm , do you think this can be implemented?

Thank you,

1 Like

What if you were able to set the SMTP server settings in the project file so you wouldn’t have to set it on each form?