EE Mail problems—500 Internal Server Error
Posted: 31 August 2004 08:39 AM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  105
Joined  03-10-2003

I have EE 1.1 up and running and was trying to send a test e-mail to myself and another member group; I got an irritating 500 Internal Server Error message:

“The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@churchoftheapostles.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.”

But the two test e-mails reached me. (I don’t think it reached the other addresses).

Was set up for PHP mail. When I tried sendmail, I got a confirmation screen from EE—but the test message never got to me. My ISP will apparently only allow SMTP to be used immediately after pinging a POP account—which is hardly practical for an EE setup.

The only thing that occurs to me is that with html forms, the ISP only allows relaying to addresses within the domain (and I am using an in-domain alias for myself). But I got the error even when I was the only sender and recipient.

Is this an EE problem or (as I fear) an ISP problem? I’m using ValueWeb, which is reliable enough as a host, but not so flexible as it should be, and poorly priced for its offerings.

Peter E.

 Signature 

Metaphilm | The Trinity Forum | Church of the Apostles

Profile
 
 
Posted: 31 August 2004 08:51 AM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

If you get a 500 error when you try to use the “PHP mail()” sending protocol, then it sounds like there’s something strange with the server.  There is an option to turn on detailed debugging for email sending.  I think it’s toward the top of system/core/core.email.php, but I don’t have a copy of the files handy to look right now, I’m afraid.

When EE uses SMTP it will attempt to authenticate itself before sending the emails.  Would that be sufficient for your SMTP server?

If your server doesn’t allow relaying to external email addresses via “mail()” or sendmail, then I think SMTP will be your only option.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 31 August 2004 09:41 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  105
Joined  03-10-2003

Well, I tried turning the debug on—where does the log show up?

Also discovered that the path to sendmail was incorrect in the variables—tried changing it to what the ISP says it should be, and still no messages from sendmail are getting through (though EE says mail was sent).

 Signature 

Metaphilm | The Trinity Forum | Church of the Apostles

Profile
 
 
Posted: 31 August 2004 12:10 PM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

The debugging information would appear on whatever page you’re using to send email.  So, if you just go into Communicate in the CP, then the info would appear there whenever you try to send email.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
Posted: 31 August 2004 02:59 PM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Some hosts turn off PHP error_reporting and instead display a 500 Server error, so you might want to make sure that this is not happening as well.

 Signature 
Profile
 
 
Posted: 04 May 2005 01:06 AM   [ Ignore ]   [ # 5 ]  
Grad Student
Rank
Total Posts:  43
Joined  09-06-2004

I have a similar problem in EE 1.2. When using phpmail I got the 500 error, but the mail are posted. When I try using sendmail i got correct debug message but no messages from sendmail are getting through.

Using phpmail I got this in the server error log:

[error] [client 80.160.189.90] malformed header from script. Bad header=<pld@pttekst.dk… Unbalanced : php-script, referer: http://www.pttekst.dk/alba/index.php?S=9b2ec28296851abc718b9be2f8269fc9ad2df969&C=communicate
Kind regards

Ole Jensen

Profile
 
 
Posted: 04 May 2005 09:17 PM   [ Ignore ]   [ # 6 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Are you running PHP as a CGI?

 Signature 
Profile
 
 
Posted: 05 May 2005 12:56 AM   [ Ignore ]   [ # 7 ]  
Grad Student
Rank
Total Posts:  43
Joined  09-06-2004

I dont think so. I had a look in the EE php info, the core information is:
——————————
PHP Version 4.3.8

System Linux s1-4m831-5.dotserv.com 2.4.22-1.2115.nptlsmp #1 SMP Wed Oct 29 15:30:09 EST 2003 i686
—————————————————-

But where to look exactly? The info said “server API = CGI”

Using sendmail I got this error in the log:

[client 80.160.189.90] sh: line 1: pld@pttekst.dk: No such file or directory, referer: http://www.pttekst.dk/xxx ........

I checked the sendmail configuration in “core.email.php and the path is OK.

I can use PM communication at the same server without any errors!

Profile
 
 
Posted: 05 May 2005 06:52 PM   [ Ignore ]   [ # 8 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Yes, Server API is where you look.  It will say CGI if it is running as a cgi, opposed to saying ‘Apache’ which means it is running through Apache as a module.  I asked because my Google search indicated that this error was commonly seen among sites when PHP was running as a CGI.

It is odd that PHP mail is failing completely and working, but sendmail is giving the ok and not sending anything.  No matter what way you send email in EE, it uses the same script for processing, core.email.php.  Here’s what I think I am going to recommend:

Delete the core.email.php file off of your server completely, grab a new copy of EE from the download and take the core.email.php file in there and upload it.  Check to make sure it has either 755 or 644 permission, then try to send an email again.

If the same thing happens, then send me an email with FTP and CP login information and I will try to hunt down exactly where the problem is occurring

 Signature 
Profile
 
 
Posted: 09 May 2005 04:10 PM   [ Ignore ]   [ # 9 ]  
Grad Student
Rank
Total Posts:  43
Joined  09-06-2004

After some ping pong and testing with Poul - Thanks for great support -
I finally solve the problem, replacing line 145 - 157 in core.email.php with line 139 - 151 from PMachine v. 2.4 email.class.php:

————————————
  function from($from)
  {
    if (ereg( ‘\<(.*)\>’, $from, $match))
        $from = $match[‘1’];

    if ($this->validate)
        $this->validate_email($this->str_to_array($from));

    $this->add_header(‘From’, $from);
    $this->add_header(‘Reply-To’, $from);
    $this->add_header(‘Return-Path’, $from);
  }
  // END

————————————

For some reason the normal script dosnīt work on my ISPīs mailserver, why is hard to say. Maybe a bug or just at strange configuration.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64978 Total Logged-in Users: 25
Total Topics: 82015 Total Anonymous Users: 22
Total Replies: 440813 Total Guests: 191
Total Posts: 522828    
Members ( View Memberlist )