Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8950055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:21:49+00:00 2026-06-15T13:21:49+00:00

I realize this question title is pretty overused, but I couldn’t find an answer

  • 0

I realize this question title is pretty overused, but I couldn’t find an answer to my problem. This could be because either I’m not too good with PHP and I don’t understand the problem, or because I have a different issue, but I thought I would post it and see if somebody can help me.

I developed a website for a local church in my city and I made the site on my computer, put it onto my website as a sub directory and tested it all. It worked great. One of the things the client wanted was there to be an email form that can send emails. I made it and all was good.

I then uploaded it onto the church server and thought it went good too. But then we decided to try the email form out, and for some reason it didn’t work.

I made the email form by having the user select a recipient (pastor, office manager, etc.) with a radio button, and that would change the action of the email form. I just did something like this:

if (recipent == "pastor") {
    document.forms[0].action = "../scripts/php/pastor_contact.php";
} else if (recipent == "pastoralAssist") {
    document.forms[0].action = "../scripts/php/pastoral_assist_contact.php";    
} else if (recipent == "famMinistry") {
    document.forms[0].action = "../scripts/php/sacra_assist_contact.php";   
} else if (recipent == "sacraAssist") {
    document.forms[0].action = "../scripts/php/fam_ministry_contact.php";   
}

I know this isn’t the cleanest, but it works great. The php files then, all look very similar to this (just a different email)”

<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$formcontent="From: $name \n Email: $email \n Phone Number: $phone \n Message: $message";
$recipient = "email@example.com";
$subject = $_POST['subject'];
$mailheader = "$subject \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("There seems to be an error with this form. Sorry about the inconveince. We are working to get this fixed.");
header('Location: ../../quickylinks/message_sent.html') ;
?>

What this does, briefly, is collect the information from the email form, submit it as an email and then redirect the user to a “Message Sent” page. This works on my server, but not theirs so I believe it’s something to do with their server.

You can see their server information here and mine here.

When the user sends the message, they get “There seems to be an error with this form. Sorry about the inconveince. We are working to get this fixed.” and the email doesn’t go through, although the code is the same on my server and it works fine there.

My initial thought was that PHP wasn’t installed on their server (rare, but it does happen). But it was. So then I thought maybe it was installed, but the “mail” function was disabled. So I tried the following php code:

<?php 
if (function_exists('mail')) { 
    echo 'mail() is available'; 
} else { 
    echo 'mail() has been disabled'; }
?>

And it came back with “mail() is available”.

So now I’m stuck and I don’t know the problem could be. As I said, I’m not very good at PHP yet so if somebody could give a detailed answer, I would be really really thankful!

Thank you so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:21:50+00:00Added an answer on June 15, 2026 at 1:21 pm

    The server may not have mail program installed or configured properly.
    To see into what is going on and fix the issue on clients server, you will need root access to it, and you may need to ssh connect to their server to check / instal / configure what is neccessary.

    First thing you should maybe do is to login with ssh to their server (not applicable if it is just a shared host, probably), and try php cli interface, and try out stuff.

    If nothing works, you will need to try editing php.ini file on their server to inform php what program it should use for mailing.

    If that doesnt give you anything, you will need to install & configure mail program, cause it probably doesnt work right on their server.

    EDIT:

    At first sight, their server has sendmail_path with no value at all. It may mean that php has no clue thru which program it is supposed to send mail.

    Your settings, however, show that you have sendmail_path setting /usr/sbin/sendmail -t -i

    So edit php.ini file on their server, sendmail_path (you need to know the path of sendmail program on their server, obviously)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize this question is pretty basic, but I'm really stuck. I have a
I realize there is a question with this title but it is not correctly
I realize this question has probably been asked numerous times, but I have not
I realize that this question has been asked 100times but none that I have
While I realize that this question has been asked once or twice ago but
I realize this is a basic question but I have searched online, been to
I realize this is more of a hardware question, but this is also very
I realize this is probably a hopelessly newbie question, but what is the difference
I realize that the answer to this question is likely quite obvious (if somewhat
I asked this question in the restkit google group, but realize now that it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.