Unix administration - local sendmail failure

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > August 2006 > local sendmail failure





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author local sendmail failure
ewunia

2006-08-07, 1:21 am

I have this strange problem can anyone help me to solve it?

I have a dedicated server with linux operating system. I only use PHP
for my scripts.
All mail from all domains sent via website DOESN'T WORK. Meaning that
whatever webform I use to send email it simply desn't send any email. I

tried simple formmail webforms and also the ones that comes with Cpanel

and they simply don't send any emails.


However all email sent via Outlook work without any problems.


What is causing a problem with sending the mail via my websites? The
PHP code to send an email via webform is very simple:
<?
$headers = "Content-type: multipart/mixed\r\n";
$headers .= "Content-transfer-encoding: 8bit\r\n";
$headers .= "From: e...@mydomain.com\r\n";
$headers .= "Reply-to: e...@mydomain.com\r\n\r\n";


$email = "supp...@domain.com";
$message = "test1";


mail($email, "test email", $message, $headers);
?>

Kevin Collins

2006-08-08, 7:21 pm

In article <1154920510.147787.147750@i3g2000cwc.googlegroups.com>, ewunia wrote:
> I have this strange problem can anyone help me to solve it?
>
> I have a dedicated server with linux operating system. I only use PHP
> for my scripts.
> All mail from all domains sent via website DOESN'T WORK. Meaning that
> whatever webform I use to send email it simply desn't send any email. I
>
> tried simple formmail webforms and also the ones that comes with Cpanel
>
> and they simply don't send any emails.
>
>
> However all email sent via Outlook work without any problems.
>
>
> What is causing a problem with sending the mail via my websites? The
> php code to send an email via webform is very simple:
><?
> $headers = "Content-type: multipart/mixed\r\n";
> $headers .= "Content-transfer-encoding: 8bit\r\n";
> $headers .= "From: e...@mydomain.com\r\n";
> $headers .= "Reply-to: e...@mydomain.com\r\n\r\n";
>
>
> $email = "supp...@domain.com";
> $message = "test1";
>
>
> mail($email, "test email", $message, $headers);
> ?>


You would be much better off posting this to a php newsgroup, although there
tends to be a lot of junk to sift through in them.

As a first guess, have you checked the output of phpinfo() to see where it
(PHP) thinks the sendmail executable resides? In php.ini, you can look for
"sendmail_path" - does it look sensible?

Have you validated that you can send mail from the command line on that server?
Try:

$ echo "this is a test" | sendmail yourid@yourdomain.com

If you get the mail, then suspect your scripts... if not, suspect your sendmail
configuration or your DNS configuration (where MX - Mail eXchanger - records
are stored).

You might also run "mailq" to see if your server has a lot of queued mail...

Kevin

--
Unix Guy Consulting, LLC
Unix and Linux Automation, Shell, PERL and CGI scripting
http://www.unix-guy.com
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com