Brian....

The following information is what I have...

I created the following PHP app.... I'm running it from the command line.

-----------------------------------------------------
#! /usr/bin/php -q
<?
#
# a.php - test app for the php mail function
#
$toaddress = "[EMAIL PROTECTED]";
$subject = "test";
$content = "Name: www \n"
           ."E-mail Address: [EMAIL PROTECTED] \n";

$e = mail($toaddress, $subject, $content);

if ($e == False)
{
echo "mail = false\n";
}
else
{
 echo "mail = true\n";
}
?>
-----------------------------------------------------

The response was:
-----------------------------------------------

mail = false

-----------------------------------------------


As you can see, the mail app failed...... The information from the
/var/spool/clientmqueue/ dir is:

----------------------------------------------------------------
[root@lserver2 savannah]# more < /var/spool/clientmqueue/dfh0P2qeLE006055

This is a MIME-encapsulated message

--h0P2qeLE006055.1043463166/lserver2.mesa.com

The original message was received at Fri, 24 Jan 2003 18:52:40 -0800
from root@localhost

   ----- The following addresses had permanent fatal errors -----
[EMAIL PROTECTED]
    (expanded from: [EMAIL PROTECTED])

   ----- Transcript of session follows -----
550 5.1.2 [EMAIL PROTECTED] Host unknown (Name server: [localhost]:
host not found)

--h0P2qeLE006055.1043463166/lserver2.mesa.com
Content-Type: message/delivery-status

Reporting-MTA: dns; lserver2.mesa.com
Arrival-Date: Fri, 24 Jan 2003 18:52:40 -0800

Final-Recipient: RFC822; [EMAIL PROTECTED]
Action: failed
Status: 5.1.2
Remote-MTA: DNS; [localhost]
Last-Attempt-Date: Fri, 24 Jan 2003 18:52:45 -0800

--h0P2qeLE006055.1043463166/lserver2.mesa.com
Content-Type: message/rfc822

Return-Path: <root>
Received: (from root@localhost)
      by lserver2.mesa.com (8.12.5/8.12.5/Submit) id h0P2qeLD006055;
      Fri, 24 Jan 2003 18:52:40 -0800
Date: Fri, 24 Jan 2003 18:52:40 -0800
From: root <root>
Message-Id: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: test

Name: www
E-mail Address: [EMAIL PROTECTED]


--h0P2qeLE006055.1043463166/lserver2.mesa.com--

======================

[root@lserver2 savannah]# more < /var/spool/clientmqueue/Qfh0P2qeLE006055
V6
T1043463166
K0
N0
P31120
I3/2/1991420
Fr
$_localhost
$r
$slocalhost
${daemon_flags}c u
SMAILER-DAEMON
C:root
rRFC822; [EMAIL PROTECTED]
RPF:root
H?P?Return-Path: <g>
H??Received: from localhost (localhost)
      by lserver2.mesa.com (8.12.5/8.12.5/Submit) id h0P2qeLE006055;
      Fri, 24 Jan 2003 18:52:46 -0800
H?D?Date: Fri, 24 Jan 2003 18:52:46 -0800
H?F?From: Mail Delivery Subsystem <MAILER-DAEMON>
H?x?Full-Name: Mail Delivery Subsystem
H?M?Message-Id: <[EMAIL PROTECTED]>
H??To: root
H??MIME-Version: 1.0
H??Content-Type: multipart/report; report-type=delivery-status;
      boundary="h0P2qeLE006055.1043463166/lserver2.mesa.com"
H??Subject: Returned mail: see transcript for details
H??Auto-Submitted: auto-generated (failure)
.

----------------------------------------------------------------

The above files are pretty much greek to me!! Other than telling me it can't
seem to handle the [EMAIL PROTECTED] address... which is odd... As a
test, I changed the email address.. I get the same response...

Is there something that I'm missing that has to be set for this to work....

I have Linux Redhat 8.0, PHP 4.2.2...

I have the sendmail RPM and the PHP RPMs from the Redhat 8.0 installation
disks....

Any help/assistance will be appreciated....

Thanks...

Bruce
[EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Brian Schmidt
Sent: Friday, January 24, 2003 6:04 PM
To: [EMAIL PROTECTED]
Subject: RE: php/sendmail/apache/linux...


On Fri, 24 Jan 2003, Bruce Douglas wrote:

> However, as I stated, I'm fairly sure that the Sendmail app is working
given
> that I was able to send an email from the command line when i did a telnet
> localhost 25....
>
> I'm just not certain as to how to do it through PHP....

Bruce,
How about trying something really simple like this. I know it works.
It's part of an HTML form I've used, so you'll need one with a $name,
$email, and $morestuff input section:

  $toaddress = "[EMAIL PROTECTED]";
  $subject = "My Subject";
  $mailcontent = "Name: ".$name."\n"
                 ."E-mail Address: ".$email."\n"
                 ."Additional Information: \n".$morestuff."\n";
  mail($toaddress, $subject, $mailcontent);

>
> thanks
>
> bruce
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Lucas Albers
> Sent: Friday, January 24, 2003 4:12 PM
> To: [EMAIL PROTECTED]
> Subject: RE: php/sendmail/apache/linux...
>
>
> Test the mailserver with the command
>
> cat message.txt | mail -f [EMAIL PROTECTED]
>
> User the Perl sendmail mail wrapper to send the mail.
> http://search.cpan.org/src/MIVKOVIC/Mail-Sendmail-0.78_5/README
>
>
> > --Luke
> > --Computer Science Sysadmin, MSU Bozeman
> > --admin(AT)cs.montana.edu 994-3931
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > On Behalf Of Bruce Douglas
> > Sent: Friday, January 24, 2003 1:48 PM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: php/sendmail/apache/linux...
> >
> > hey...
> >
> > I'm sure the question has been answered a 1000 times!!! I'm trying to
> > create
> > a simple app to send email via PHP, using the "mail" function.
> >
> > I'm using RedHat(Linux 8.0 , Sendmail), PHP(4.2.2), Apache (2.0.40).
> >
> > I'm using the following piece of code:
> >
> >
==========================================================================
> > =
> > //test mail....
> > $to = "[EMAIL PROTECTED]";
> > $subject = "savannah registration";
> > $message = " testing mail";
> > $reply = "From: [EMAIL PROTECTED]\r\n"
> >         ."Reply-To: [EMAIL PROTECTED]\r\n";
> >
> > echo"
> >  to = " . $to . "<br>";
> >
> > echo"
> >  subject = " . $subject . "<br>";
> >
> > echo"
> >  msg = " . $message . "<br>";
> >
> > echo"
> >  reply = " . $reply . "<br>";
> >
> >          $q1 = mail($to, $subject, $message, $reply);
> > echo"
> >  return val  = " . $q1 . "<br>";
> >
> >
==========================================================================
> > ==
> > ===========
> >
> > Pretty simple eh... The problem that I have is that the mail doesn't
> > appear
> > to get sent. When I look in the /var/spool/clientmqueue directory, I see
a
> > great deal of what look to be error msgs.... They appear to be telling
me
> > that the mail couldn't be delivered, but I can't tell why....
> >
> > I was able to successfully send a test msg via Sendmail from the command
> > line by telnet. So I know the Sendmail engine/daemon seems to be
> > performing... The PHP.ini file appears to be setup correctly, with the
> > sendmail_path pointing to sendamil.
> >
> > Any ideas as to what I need to do, or should be checking....
> >
> > Any pointers/assistance would be greatly appreciated.
> >
> >
> > Thanks
> >
> > -Bruce
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > Psyche-list mailing list
> > [EMAIL PROTECTED]
> > https://listman.redhat.com/mailman/listinfo/psyche-list
>
>
>
> --
> Psyche-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/psyche-list
>
>
>
> --
> Psyche-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/psyche-list
>

[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org



--
Psyche-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/psyche-list


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to