• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Sitejet Builder contact form email settings

Salaupion

New Pleskian
Server operating system version
Debian 12
Plesk version and microupdate number
Plesk 18.0.60
Hi,

I am trying to configure a contact form in the sitejet builder. I am using the basic contact form, but when the site is published I get "Could not send e-mail" error (attached). I checked and allow_url_fopen is enabled.

Appart from the form field (Recipient & Sender) I could not find any info on how to setup the email account that should be used for sending. Is it automatically linked ? Should I set it up in Plesk ? If yes, I could not find where.

Many thanks.
 

Attachments

  • TP_couldnotsendemail_error.png
    TP_couldnotsendemail_error.png
    24.6 KB · Views: 2
Did you enable the "Send email" option in SiteJet and added a Recipient and Sender to the form settings?

Schermafbeelding 2024-05-09 155029.png
 
If I am not mistaken SiteJet uses the native PHP mail() function to sent email. Maybe the server isn't configured to send mail using PHP?

You cloud test this by creating a custom PHP script (for testing purposes) with the code below. Does that produce an error when you try to access the script? Or do you receive the test mail?

Code:
<?php
$message = "Hello World";
$subject = "Test email";
$to = "[email protected]"; // Replace with your own email adres

// Send
$response = mail($to, $subject , $message);

if($response === true){
    echo "Mail function accecpted mail";
}else{
    echo "Error sending email";
}
?>
 
Unfortunately, It returns "Error sending email". And logs show no errors.
That means that the required php mail() function has been disabled on the server. If you manage the server yourself you try to can enable the mail() function. If the server is managed by someone else contact them to ask if php's mail() function can be enabled.
 
Got it. I will look into it. It's a mutualised server, so I'm not sure I have control over it, and they might not even allow the use of the mail() function.
Thanks again.
 
By the way, since I can probably not use the contact form, do you have any suggestions on how to include an alternative contact form ? I tried to include a google form with no success for now (using an iframe block). But there might be easy solutions. Maybe I'll just add a simple mailto: link
Thanks.
 
By the way, since I can probably not use the contact form, do you have any suggestions on how to include an alternative contact form ? I tried to include a google form with no success for now (using an iframe block). But there might be easy solutions. Maybe I'll just add a simple mailto: link
Thanks.
I am not sure. That would be a question best asked in the SiteJet community forums.
 
Back
Top