Contact form problems

I know, this isn’t a new subjet, I’ve already tried some configurations of from & sent to emails, but my contact form does not work, even though it does show the message that it was successful…
any ideas?
the website is :
http://ennoia-med.fr/index.html

& at the moment I’ve set up the “sent to” email to my personal gmail account to check if it works…

many thanks

joanna

Are you certain these emails are not going to a spam folder or being deleted automatically by gmail?

Hi @joa

I sent a test. Might want to check to make sure that your email account is not full. I see this a lot w/ gmail accounts, where the online storage has wiped out the email being able to receive.

Bill
BricsDesign

@Flashman
Unfortunatelly I’am sure… I’ve already tried my professional email, & the client as well…

I would simply check with your web host what they recommend as settings. My solution for this is always to use my cpanel username@servername as the sender and they come through every time. I now host client websites on my own server where I do this, but it has worked well on other servers as well.

This works if sending to the domain email or gmail.

@Flashman, the username@servername is what i’ve already done.
I’ll ask the web host, thanks.
@Bill thanks for your suggestion, seems like it’s fine though :wink:

My hosting servers required me to add a code snippet, might be worth checking with your hosting service.
Another thought, if you are using cPanel you can track email there, that might give a clue if something like Strike spam filter is trapping them.

@MartinC I can see I’m new to blocks, code snippet is a code that you have to add to your blocs website?
& no the web host I’m using is not a cPanel…

thanks,

Yes, they provided a dedicated piece of code in their documentation. Not near my Mac to check it right now. But I think it is a quirk with my provider and may not be relevant in your case.

Be sure the mail you are sending to has the same domain where the web is hosted:
For example my domain is chicuelo.com.ar and my mail hola@chicuelo.com.ar.
If you are trying to send to a different domain it won’t work

It should work, I have some forms sending email to gmail addresses.

Some web hosts will not allow their sendmail function to direct emails to addresses outside of the hosted domain. This is a security measure to help prevent servers becoming spam gateways should someone compromise your website or form script. I work with a number of hosting companies that specifically disallow sending to Gmail and other generic email servers. One way to overcome the issue would be to use an SMTP email account on your domain to forward emails via your forms. Essentially, the form content is forwarded as a regular email from an account that you own. Unfortunately, you cannot use the standard script used by Blocs - instead, you will have to use a third party script that allows for access to an SMPT account.

A simpler solution would be to set up an email account on your own domain for receiving form responses. This can then be set up to automatically forward to an alternative email address if required.

I’m having the same issue with one hosting provider and we can’t get forms working. I’ve simple bypassed problem with a third party to be able to add a form to a static site. I’m using Formspree but there’s countless other ones as well.

@Jerry I would contact the hosting company and ask them why it doesn’t work for you. The problem with using third party solutions is that if the server where the form processing script is hosted is having issues or is down completely, then the forms on your site will not work. Much better to ask the host to provide a solution for you. Many will tell you what I’ve stated in my earlier response and will probably recommend setting up a domain-specific email account on their server. That will solve the problem instantly. If you have to have emails sent to email addresses outside of the web domain, just implement the other recommendation I made - set up an autoforward on the domain-specific email address.

HI :slightly_smiling_face:
I was having similar problem, then I call my hosting provider and they guide me to enter my cpanel–> Php Version–> Switch to PHP options–>Field “disable_functions” and from this field delete the word “mail” and Magic!! Here some screenshots of the process.




Greetings from Chile :slight_smile:

Thanks everybody,
I’ll be back tomorrow to sort this out! The firs think I’ve done I’ve tried my client email that is set up on his domaine, it didn’t work neither. I’ll call the hosting provider, let’s see if he can help me! I’ll let you know!
Thanks a lot :slight_smile:
Joanna

@hendon52
@Flashman
@Norm

Called the support,

cleary they did not like the code…
They said the problem is in “the code”
I’m not a coder, tried to keep the discussion saying that I’cant really understand why it does not work on my site et does work on other sites…
anyway the answer from the provider was: have a look at your messed up code, fix it & it will work…
then, I’ve tried to open it on textEdit.app that gives me a full page of code (he was complainig about it as well), do I actually need an other application to look (change) the code? he was talking about the line 7,8,19…
anyway thanks for help,

Joanna

I’m a bit lost, cos as a matter of fact my contact form dose not work & I can’t really leave it like that…

Have you thought of changing web host? I don’t need any code on my sites and it just works every time with the projects I build using Blocs.

For convenience, I tend to use the same web server for my web design clients, but I’ve never had a problem with other web hosts either.

web host is a client choice… it might be very complicated to change it & then how do I know if it work with others? (I mean I’m french based, the French like to stay within the country :wink: unless you can recommand me we french web host!
thanks anyway :wink:

When you say code, are we talking the forms.php file?

I am only seeing this in mine:
?php
if(empty(_POST['name']) && strlen(_POST[‘name’]) == 0 || empty(_POST['email']) && strlen(_POST[‘email’]) == 0 || empty(_POST['message']) && strlen(_POST[‘message’]) == 0)
{
return false;
}

$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];

$to = 'Feedback@paganthoughts.co.uk'; // Email submissions are sent to this email

// Create email	
$email_subject = "Message from a Blocs website.";
$email_body = "You have received a new message. \n\n".
			  "Name: $name \nEmail: $email \nMessage: $message \n";
$headers = "MIME-Version: 1.0\r\nContent-type: text/plain; charset=UTF-8\r\n";	
$headers .= "From: site@paganthoughts.co.uk\n";
$headers .= "Reply-To: $email";	

mail($to,$email_subject,$email_body,$headers); // Post message
return true;			

?>

My service provider needs me to add the following line at the top of the file, but it is only pathing info:
ini_ser(“include_path”,’/home/casualph/php:’.ini_get(“include_path”));