[KLUG Members] php mail problem

Todd Pillars members@kalamazoolinux.org
Sat, 17 Aug 2002 23:33:22 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C24646.79FB69D0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

what version of php? and are you cc or Bcc to anyone when you mail()?

also make sure all your php.ini params are correct - go through line by
line - specifically check about line 310-311 for your sendmail options
right now your script is running as apache and is defaulting to
apache@hercules (localhost) make sure your script is sending a fully
qualified domain. ie webmaster@your.com for the From: field which in turn
will default to the Return-to field.

and check http://www.php.net/manual/en/function.mail.php to catch all the
things I missed : )

Todd
  -----Original Message-----
  From: members-admin@kalamazoolinux.org
[mailto:members-admin@kalamazoolinux.org]On Behalf Of Russell Dillenburg
  Sent: Saturday, August 17, 2002 10:55 PM
  To: members@kalamazoolinux.org
  Subject: [KLUG Members] php mail problem


  Hi,

  My server seems to be having trouble sending emails.  I noticed when I
trie wat d emailing in one of my php scripts,
http://russell.knightec.net/contact/.  I included below what gets bounced
back to me.

  If you were to try and send a message using that it'll just come back to
from mail daemon.  I had this working before, but forget how, or what I did.
Maybe something about my hostname/domain?  I am using the mail function in
php to send.  This has worked fine in the past (old server).

  Thanks for any help!

  Russell Dillenburg




              From Mail Delivery Subsystem Sat Aug 17 19:46:00 2002
              X-Apparently-To: rdillenbu@yahoo.com via -40.-120.-81.80; 17
Aug 2002 19:51:16 -0700 (PDT)
              Return-Path: <>
              Received: from 209.68.1.157 (HELO gwind.pair.com)
(209.68.1.157) by mta624.mail.yahoo.com with SMTP; 17 Aug 2002
19:51:16 -0700 (PDT)
              Received: (qmail 1411 invoked by uid 3036); 18 Aug 2002
02:51:15 -0000
              Delivered-To: jfd-dillenburg:org-russell@dillenburg.org
              Received: (qmail 1408 invoked from network); 18 Aug 2002
02:51:14 -0000
              Received: from 12-251-0-48.client.attbi.com (HELO hercules)
(12.251.0.48) by gwind.pair.com with SMTP; 18 Aug 2002 02:51:14 -0000
              Received: from localhost (localhost) by hercules
(8.11.6/8.11.6) id g7I2k0B09115; Sat, 17 Aug 2002 21:46:00 -0500
              Date: Sat, 17 Aug 2002 21:46:00 -0500
              From: "Mail Delivery Subsystem" <MAILER-DAEMON@hercules> |
This is Spam | Add to Address Book
              Message-Id: <200208180246.g7I2k0B09115@hercules>
              To: apache@hercules
              MIME-Version: 1.0
              Content-Type: multipart/report; report-type=delivery-status;
boundary="g7I2k0B09115.1029638760/hercules"
              Subject: Returned mail: see transcript for details
              Auto-Submitted: auto-generated (failure)
              Content-Length: 625





The original message was received at Sat, 17 Aug 2002 21:46:00 -0500
from apache@localhost

   ----- The following addresses had permanent fatal errors -----
rdillenbu@yahoo.com
    (reason: 501 Syntax error in parameters or arguments)

   ----- Transcript of session follows -----
... while talking to mx1.mail.yahoo.com.:
>>> MAIL From:<apache@hercules> SIZE=159
<<< 501 Syntax error in parameters or arguments
501 5.6.0 Data format error



        Message/delivery-status

Reporting-MTA: dns; hercules
Arrival-Date: Sat, 17 Aug 2002 21:46:00 -0500

Final-Recipient: RFC822; rdillenbu@yahoo.com
Action: failed
Status: 5.5.2
Diagnostic-Code: SMTP; 501 Syntax error in parameters or arguments
Last-Attempt-Date: Sat, 17 Aug 2002 21:46:00 -0500



        Forwarded Message [ Save to my Yahoo! Briefcase  |  Download File ]
        Return-Path: <apache>
        Received: (from apache@localhost) by hercules (8.11.6/8.11.6) id
g7I2k0C09112; Sat, 17 Aug 2002 21:46:00 -0500
        Message-Id: <200208180246.g7I2k0C09112@hercules>
        To: rdillenbu@yahoo.com
        Subject: Message from website
        From: "testing" <russell@test.dillenburg.org>
        Date: Sat, 17 Aug 2002 21:45:59 -18000



testing stuff here




        --
        Russell Dillenburg
        "The software business is binary, you're either a 1 or a 0--alive or
dead."






----------------------------------------------------------------------------
--
  Do You Yahoo!?
  HotJobs, a Yahoo! service - Search Thousands of New Jobs

------=_NextPart_000_000D_01C24646.79FB69D0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D039521703-18082002>what=20
version of php? and are you cc or Bcc to anyone when you=20
mail()?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D039521703-18082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D039521703-18082002>also=20
make sure all your php.ini params are correct - go through line by line =
-=20
specifically check about line 310-311 for your sendmail=20
options</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D039521703-18082002>right=20
now your script is running as apache and is defaulting to <A=20
href=3D"mailto:apache@hercules">apache@hercules</A>&nbsp;(localhost) =
make sure=20
your script is sending a fully qualified domain. ie <A=20
href=3D"mailto:webmaster@your.com">webmaster@your.com</A>&nbsp;for the =
From: field=20
which in turn will default to the Return-to field.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D039521703-18082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D039521703-18082002>and=20
check <A=20
href=3D"http://www.php.net/manual/en/function.mail.php">http://www.php.ne=
t/manual/en/function.mail.php</A>&nbsp;to=20
catch all the things I missed : )</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D039521703-18082002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D039521703-18082002>Todd</SPAN></FONT></DIV>
<BLOCKQUOTE>
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  members-admin@kalamazoolinux.org=20
  [mailto:members-admin@kalamazoolinux.org]<B>On Behalf Of </B>Russell=20
  Dillenburg<BR><B>Sent:</B> Saturday, August 17, 2002 10:55 =
PM<BR><B>To:</B>=20
  members@kalamazoolinux.org<BR><B>Subject:</B> [KLUG Members] php mail=20
  problem<BR><BR></FONT></DIV>
  <P>Hi,</P>
  <P>My server seems to be having trouble sending emails.&nbsp; I =
noticed when I=20
  trie<SPAN class=3D039521703-18082002><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>&nbsp;wat&nbsp;</FONT></SPAN>d emailing in one of my php =
scripts, <A=20
  =
href=3D"http://russell.knightec.net/contact/">http://russell.knightec.net=
/contact/</A>.&nbsp;=20
  I included below what gets bounced back to me.&nbsp; </P>
  <P>If you were to try and send a message using that it'll just come =
back to=20
  from mail daemon.&nbsp; I had this working before, but forget how, or =
what I=20
  did.&nbsp; Maybe something about my hostname/domain?&nbsp;&nbsp;I am =
using the=20
  mail function in php to send.&nbsp; This has worked fine in the past =
(old=20
  server).&nbsp; </P>
  <P>Thanks for any help!</P>
  <P>Russell Dillenburg</P>
  <P><FONT face=3DArial color=3D#0000ff size=3D2></FONT>&nbsp;</P>
  <P>
  <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%" border=3D0>
    <TBODY>
    <TR>
      <TD>
        <TABLE cellSpacing=3D0 cellPadding=3D3 width=3D"100%" =
border=3D0>
          <TBODY>
          <TR vAlign=3Dtop>
          <TR class=3Dbge width=3D"100%">
            <TD align=3Dleft colSpan=3D2>From Mail Delivery Subsystem =
Sat Aug 17=20
              19:46:00 2002</TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>X-Apparently-To:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>rdillenbu@yahoo.com =
via=20
              -40.-120.-81.80; 17 Aug 2002 19:51:16 -0700=20
          (PDT)</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Return-Path:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT =
size=3D1>&lt;&gt;</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Received:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>from 209.68.1.157 =
(HELO=20
              gwind.pair.com) (209.68.1.157) by mta624.mail.yahoo.com =
with SMTP;=20
              17 Aug 2002 19:51:16 -0700 (PDT)</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Received:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>(qmail 1411 invoked =
by uid=20
              3036); 18 Aug 2002 02:51:15 -0000</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Delivered-To:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT=20
              =
size=3D1>jfd-dillenburg:org-russell@dillenburg.org</FONT></SMALL></TD></T=
R>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Received:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>(qmail 1408 invoked =
from=20
              network); 18 Aug 2002 02:51:14 =
-0000</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Received:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>from=20
              12-251-0-48.client.attbi.com (HELO hercules) (12.251.0.48) =
by=20
              gwind.pair.com with SMTP; 18 Aug 2002 02:51:14=20
            -0000</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Received:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>from localhost =
(localhost) by=20
              hercules (8.11.6/8.11.6) id g7I2k0B09115; Sat, 17 Aug 2002 =

              21:46:00 -0500</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>Date:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>Sat, 17 Aug 2002 =
21:46:00=20
              -0500</FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT=20
              size=3D1>From:</FONT></SMALL></B></TD>
            <TD width=3D"100%"><SMALL><FONT size=3D1>"Mail Delivery =
Subsystem"=20
              &lt;MAILER-DAEMON@hercules&gt;&nbsp;|&nbsp;<B><A=20
              =
href=3D"http://us.f135.mail.yahoo.com/ym/BlockSender?MessRet=3D1&amp;.cru=
mb=3DsjeyxbO5Hsl&amp;SP=3DYes&amp;NE=3Dmailer-daemon@hercules&amp;box=3DI=
nbox&amp;MsgId=3D1260_2230919_4729_1327_625_0_16618&amp;inc=3D&amp;num=3D=
&amp;Search=3D&amp;YY=3D41442&amp;order=3Ddown&amp;sort=3Ddate&amp;pos=3D=
0"><SMALL>This=20
              is Spam</SMALL></A></B>&nbsp;|&nbsp;<B><A=20
              =
href=3D"javascript:document.frmAddAddrs.submit()"><SMALL>Add to=20
              Address Book</SMALL></A></B></FONT></SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap=20
            align=3Dright><B><SMALL>Message-Id:</SMALL></B></TD>
            <TD=20
              =
width=3D"100%"><SMALL>&lt;200208180246.g7I2k0B09115@hercules&gt;</SMALL><=
/TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap =
align=3Dright><B><SMALL>To:</SMALL></B></TD>
            <TD width=3D"100%"><SMALL>apache@hercules</SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap=20
              align=3Dright><B><SMALL>MIME-Version:</SMALL></B></TD>
            <TD width=3D"100%"><SMALL>1.0</SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap=20
              align=3Dright><B><SMALL>Content-Type:</SMALL></B></TD>
            <TD width=3D"100%"><SMALL>multipart/report;=20
              report-type=3Ddelivery-status;=20
              =
boundary=3D"g7I2k0B09115.1029638760/hercules"</SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap=20
align=3Dright><B><SMALL>Subject:</SMALL></B></TD>
            <TD width=3D"100%"><SMALL>Returned mail: see transcript for=20
              details</SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap=20
              align=3Dright><B><SMALL>Auto-Submitted:</SMALL></B></TD>
            <TD width=3D"100%"><SMALL>auto-generated =
(failure)</SMALL></TD></TR>
          <TR class=3Dbge>
            <TD vAlign=3Dtop noWrap=20
              align=3Dright><B><SMALL>Content-Length:</SMALL></B></TD>
            <TD =
width=3D"100%"><SMALL>625</SMALL></TD></TR></TBODY></TABLE></TD>
      <TD vAlign=3Dtop bgColor=3D#eeeeee>
        <FORM name=3DfrmAddAddrs=20
        =
action=3Dhttp://address.mail.yahoo.com/yab/us?v=3DYM&amp;cmode=3D1&amp;La=
ng=3Dus=20
        method=3Dpost>
        <TABLE cellSpacing=3D0 cellPadding=3D0 width=3D"100%" =
border=3D0>
          <TBODY>
          <TR vAlign=3Dtop>
            <TD align=3Dleft bgColor=3D#eeeeee><FONT face=3DArial=20
              size=3D-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
        =
</FONT></TD></TR></TBODY></TABLE></FORM></TD></TR></TBODY></TABLE><BR></P=
>
  <DIV id=3Dmessage><PRE><TT>The original message was received at Sat, =
17 Aug 2002 21:46:00 -0500
from apache@localhost

   ----- The following addresses had permanent fatal errors -----
<A =
href=3D"http://us.f135.mail.yahoo.com/ym/Compose?To=3Drdillenbu@yahoo.com=
&amp;YY=3D41442&amp;order=3Ddown&amp;sort=3Ddate&amp;pos=3D0">rdillenbu@y=
ahoo.com</A>
    (reason: 501 Syntax error in parameters or arguments)

   ----- Transcript of session follows -----
... while talking to mx1.mail.yahoo.com.:
&gt;&gt;&gt; MAIL From:&lt;apache@hercules&gt; SIZE=3D159
&lt;&lt;&lt; 501 Syntax error in parameters or arguments
501 5.6.0 Data format error
</TT></PRE><BR><BR>
  <TABLE cellSpacing=3D0 cellPadding=3D4 width=3D"100%" border=3D0>
    <TBODY>
    <TR class=3Dheada>
      <TD><B>Message/delivery-status</B> =
</TD></TR></TBODY></TABLE><PRE><FONT size=3D+0>Reporting-MTA: dns; =
hercules
Arrival-Date: Sat, 17 Aug 2002 21:46:00 -0500

Final-Recipient: RFC822; <A =
href=3D"http://us.f135.mail.yahoo.com/ym/Compose?To=3Drdillenbu@yahoo.com=
&amp;YY=3D41442&amp;order=3Ddown&amp;sort=3Ddate&amp;pos=3D0">rdillenbu@y=
ahoo.com</A>
Action: failed
Status: 5.5.2
Diagnostic-Code: SMTP; 501 Syntax error in parameters or arguments
Last-Attempt-Date: Sat, 17 Aug 2002 21:46:00 -0500
</FONT></PRE><BR><BR>
  <TABLE cellSpacing=3D0 cellPadding=3D4 width=3D"100%" border=3D0>
    <TBODY>
    <TR class=3Dheada>
      <TD><B>Forwarded Message</B> [ <A=20
        =
href=3D"http://us.f135.mail.yahoo.com/ym/ShowLetter/file.txt?box=3DInbox&=
amp;MsgId=3D1260_2230919_4729_1327_625_0_16618&amp;bodyPart=3D3.TEXT&amp;=
filename=3Dfile.txt&amp;Briefcase=3D1&amp;tnef=3D&amp;YY=3D41442&amp;orde=
r=3Ddown&amp;sort=3Ddate&amp;pos=3D0">Save=20
        to my Yahoo! Briefcase</A> &nbsp;|&nbsp; <A=20
        =
href=3D"http://us.f135.mail.yahoo.com/ym/ShowLetter/file.txt?box=3DInbox&=
amp;MsgId=3D1260_2230919_4729_1327_625_0_16618&amp;bodyPart=3D3.TEXT&amp;=
filename=3Dfile.txt&amp;download=3D1&amp;YY=3D41442&amp;order=3Ddown&amp;=
sort=3Ddate&amp;pos=3D0">Download=20
        File</A> ] </TD></TR></TBODY></TABLE>
  <TABLE cellSpacing=3D0 cellPadding=3D3 border=3D0>
    <TBODY>
    <TR class=3Dbge>
      <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT =
face=3DVerdana=20
        size=3D1>Return-Path:</FONT></SMALL></B></TD>
      <TD width=3D"100%"><SMALL><FONT face=3DVerdana=20
        size=3D1>&lt;apache&gt;</FONT></SMALL></TD></TR>
    <TR class=3Dbge>
      <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT =
face=3DVerdana=20
        size=3D1>Received:</FONT></SMALL></B></TD>
      <TD width=3D"100%"><SMALL><FONT face=3DVerdana size=3D1>(from=20
        apache@localhost) by hercules (8.11.6/8.11.6) id g7I2k0C09112; =
Sat, 17=20
        Aug 2002 21:46:00 -0500</FONT></SMALL></TD></TR>
    <TR class=3Dbge>
      <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT =
face=3DVerdana=20
        size=3D1>Message-Id:</FONT></SMALL></B></TD>
      <TD width=3D"100%"><SMALL><FONT face=3DVerdana=20
        =
size=3D1>&lt;200208180246.g7I2k0C09112@hercules&gt;</FONT></SMALL></TD></=
TR>
    <TR class=3Dbge>
      <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT =
face=3DVerdana=20
        size=3D1>To:</FONT></SMALL></B></TD>
      <TD width=3D"100%"><SMALL><FONT face=3DVerdana=20
        size=3D1>rdillenbu@yahoo.com</FONT></SMALL></TD></TR>
    <TR class=3Dbge>
      <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT =
face=3DVerdana=20
        size=3D1>Subject:</FONT></SMALL></B></TD>
      <TD width=3D"100%"><SMALL><FONT face=3DVerdana size=3D1>Message =
from=20
        website</FONT></SMALL></TD></TR>
    <TR class=3Dbge>
      <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT =
face=3DVerdana=20
        size=3D1>From:</FONT></SMALL></B></TD>
      <TD width=3D"100%"><SMALL><FONT face=3DVerdana size=3D1>"testing"=20
        &lt;russell@test.dillenburg.org&gt;</FONT></SMALL></TD></TR>
    <TR class=3Dbge>
      <TD vAlign=3Dtop noWrap align=3Dright><B><SMALL><FONT =
face=3DVerdana=20
        size=3D1>Date:</FONT></SMALL></B></TD>
      <TD width=3D"100%"><SMALL><FONT face=3DVerdana size=3D1>Sat, 17 =
Aug 2002=20
        21:45:59 =
-18000</FONT></SMALL></TD></TR></TBODY></TABLE><BR><PRE><TT>
testing stuff here
</TT></PRE></DIV><BR><BR>
  <TABLE width=3D"67%" border=3D0>
    <TBODY>
    <TR>
      <TD width=3D"50%">
        <P><A href=3D"http://12.251.0.48/"><IMG=20
        src=3D"http://12.251.0.48/icons/Ysignature.gif" border=3D0=20
        NOSEND=3D"1"></A><BR>--<BR>Russell Dillenburg<BR><EM>"The =
software=20
        business is binary, you're either a 1 or a 0--alive or=20
    dead."</EM></P></TD></TR></TBODY></TABLE>
  <P><BR>
  <HR SIZE=3D1>
  <B>Do You Yahoo!?</B><BR><A=20
  =
href=3D"http://rd.yahoo.com/careers/mailsig/new/*http://www.hotjobs.com">=
HotJobs,=20
  a Yahoo! service</A> - Search Thousands of New =
Jobs</BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_000D_01C24646.79FB69D0--