how do you force Received: variable in mail()?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • NotGiven

    #1

    how do you force Received: variable in mail()?

    With the help from this group, I was able to change my Return-Path parameter
    seen in the full headers of email sent with mail().

    Now I still see my userID in the parameter as shown here seen in my full
    headers of my email sent.

    Received: (from userID@localhos t) by mydomain.com


    Any ideas?

    Thanks again!


  • CountScubula

    #2
    Re: how do you force Received: variable in mail()?

    "NotGiven" <noname@nonegiv en.net> wrote in message
    news:XZ%Jb.8494 $vO5.6891@bigne ws6.bellsouth.n et...[color=blue]
    > With the help from this group, I was able to change my Return-Path[/color]
    parameter[color=blue]
    > seen in the full headers of email sent with mail().
    >
    > Now I still see my userID in the parameter as shown here seen in my full
    > headers of my email sent.
    >
    > Received: (from userID@localhos t) by mydomain.com
    >
    >
    > Any ideas?
    >
    > Thanks again!
    >
    >[/color]

    I am working on a new piece of mailer script, that will MX mail right into
    the destination mail server.
    (in between my scuba diving, I will finishit, the code is not hard, but
    comming up with a good layout is)


    This will address the problem, look for it on my site later.

    --
    Mike Bradley
    http://gzen.myhq.info -- free online php tools


    Comment

    • CountScubula

      #3
      Re: how do you force Received: variable in mail()?

      > "NotGiven" <noname@nonegiv en.net> wrote in message[color=blue]
      > news:XZ%Jb.8494 $vO5.6891@bigne ws6.bellsouth.n et...[color=green]
      > > With the help from this group, I was able to change my Return-Path[/color]
      > parameter[color=green]
      > > seen in the full headers of email sent with mail().
      > >
      > > Now I still see my userID in the parameter as shown here seen in my full
      > > headers of my email sent.
      > >
      > > Received: (from userID@localhos t) by mydomain.com
      > >
      > >
      > > Any ideas?
      > >
      > > Thanks again![/color][/color]


      ok, new MX mailing script is done, you can find it here:


      --
      Mike Bradley
      http://www.gzentools.com -- free online php tools


      Comment

      • NotGiven

        #4
        Re: how do you force Received: variable in mail()?

        thanks. I don't know enough about PHP to understand it all but it look
        slike I might be able try to understand it.

        I need to loop through names in a database and send an email to each
        indivdually. I suppose I could send all names to an array and pass that to
        the function, and add a loop/foreach.

        Thanks again.


        "CountScubu la" <me@scantek.hot mail.com> wrote in message
        news:Qg0Kb.5581 $eJ5.60@newssvr 27.news.prodigy .com...[color=blue]
        > "NotGiven" <noname@nonegiv en.net> wrote in message
        > news:XZ%Jb.8494 $vO5.6891@bigne ws6.bellsouth.n et...[color=green]
        > > With the help from this group, I was able to change my Return-Path[/color]
        > parameter[color=green]
        > > seen in the full headers of email sent with mail().
        > >
        > > Now I still see my userID in the parameter as shown here seen in my full
        > > headers of my email sent.
        > >
        > > Received: (from userID@localhos t) by mydomain.com
        > >
        > >
        > > Any ideas?
        > >
        > > Thanks again!
        > >
        > >[/color]
        >
        > I am working on a new piece of mailer script, that will MX mail right into
        > the destination mail server.
        > (in between my scuba diving, I will finishit, the code is not hard, but
        > comming up with a good layout is)
        >
        >
        > This will address the problem, look for it on my site later.
        >
        > --
        > Mike Bradley
        > http://gzen.myhq.info -- free online php tools
        >
        >[/color]


        Comment

        • CountScubula

          #5
          Re: how do you force Received: variable in mail()?

          "NotGiven" <noname@nonegiv en.net> wrote in message
          news:tcjKb.1932 5$kK.1876@bigne ws3.bellsouth.n et...[color=blue]
          > thanks. I don't know enough about PHP to understand it all but it look
          > slike I might be able try to understand it.
          >
          > I need to loop through names in a database and send an email to each
          > indivdually. I suppose I could send all names to an array and pass that[/color]
          to[color=blue]
          > the function, and add a loop/foreach.
          >
          > Thanks again.
          >
          >[/color]


          let me ask a question,

          how many emails do you need to send, and are you doing this from a web page?

          Reason I ask, is there is an easier way to do it, if this is a background
          proccess.

          --
          Mike Bradley
          http://www.gzentools.com -- free online php tools


          Comment

          • malcolm

            #6
            Re: how do you force Received: variable in mail()?


            Hi Mike,

            Great scripts, I have been fooling with the first one all weekend. Neat
            thing.
            On this new one though I get this error ; See
            Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.


            It's about 'raw linefeeds' any help here ?



            On Mon, 05 Jan 2004 01:29:55 GMT, CountScubula <me@scantek.hot mail.com>
            wrote:
            [color=blue][color=green]
            >> "NotGiven" <noname@nonegiv en.net> wrote in message
            >> news:XZ%Jb.8494 $vO5.6891@bigne ws6.bellsouth.n et...[color=darkred]
            >> > With the help from this group, I was able to change my Return-Path[/color]
            >> parameter[color=darkred]
            >> > seen in the full headers of email sent with mail().
            >> >
            >> > Now I still see my userID in the parameter as shown here seen in my[/color]
            >> full[color=darkred]
            >> > headers of my email sent.
            >> >
            >> > Received: (from userID@localhos t) by mydomain.com
            >> >
            >> >
            >> > Any ideas?
            >> >
            >> > Thanks again![/color][/color]
            >
            >
            > ok, new MX mailing script is done, you can find it here:
            > http://www.gzentools.com/snippetview...l&v=mxmail.php
            >
            > --
            > Mike Bradley
            > http://www.gzentools.com -- free online php tools
            >
            >[/color]



            --
            Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

            Comment

            • CountScubula

              #7
              Re: how do you force Received: variable in mail()?

              "malcolm" <malcolm@mbrown ell.com> wrote in message
              news:opr1bm1nyq 6v94lj@news.eas t.cox.net...[color=blue]
              >
              > Hi Mike,
              >
              > Great scripts, I have been fooling with the first one all weekend.[/color]
              Neat[color=blue]
              > thing.[/color]

              Thank you

              [color=blue]
              > On this new one though I get this error ; See
              > http://pobox.com/~djb/docs/smtplf.html
              >
              > It's about 'raw linefeeds' any help here ?
              >[/color]

              sorry, I guess, I should go clean up some of my stuff.

              on everything in my script that you are using, when you find a \n, replace
              it with \r\n

              --
              Mike Bradley
              http://www.gzentools.com -- free online php tools


              Comment

              • malcolm

                #8
                Re: how do you force Received: variable in mail()?

                That was it, thanks Scub, you rock.
                I like your site too.

                On Mon, 05 Jan 2004 21:40:02 GMT, CountScubula <me@scantek.hot mail.com>
                wrote:
                [color=blue]
                > "malcolm" <malcolm@mbrown ell.com> wrote in message
                > news:opr1bm1nyq 6v94lj@news.eas t.cox.net...[color=green]
                >>
                >> Hi Mike,
                >>
                >> Great scripts, I have been fooling with the first one all weekend.[/color]
                > Neat[color=green]
                >> thing.[/color]
                >
                > Thank you
                >
                >[color=green]
                >> On this new one though I get this error ; See
                >> http://pobox.com/~djb/docs/smtplf.html
                >>
                >> It's about 'raw linefeeds' any help here ?
                >>[/color]
                >
                > sorry, I guess, I should go clean up some of my stuff.
                >
                > on everything in my script that you are using, when you find a \n,
                > replace
                > it with \r\n
                >
                > --
                > Mike Bradley
                > http://www.gzentools.com -- free online php tools
                >
                >[/color]



                --
                Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

                Comment

                • NotGiven

                  #9
                  Re: how do you force Received: variable in mail()?

                  I downloaded a simple mailing list tool from hotscripts and here's the meat
                  of the sending engine with your siggestion added to the mail parameters:

                  $headers = "From: \"".FROMNAME."\ " <".FROMEMAIL."> \r\n";
                  $email['fromemail'] = "me@mydomain.co m";
                  while ($row = mysql_fetch_arr ay($res2)) {
                  $email_addr = $row[0];
                  $fullmessage = $_POST[message];
                  mail("$email_ad dr", "$_POST[subject]", $fullmessage, $headers, "-f
                  {$email[fromemail]}");
                  }
                  echo "email sent!";


                  [color=blue]
                  > let me ask a question,
                  >
                  > how many emails do you need to send, and are you doing this from a web[/color]
                  page?[color=blue]
                  >
                  > Reason I ask, is there is an easier way to do it, if this is a background
                  > proccess.
                  >
                  > --
                  > Mike Bradley
                  > http://www.gzentools.com -- free online php tools
                  >
                  >[/color]


                  Comment

                  • CountScubula

                    #10
                    Re: how do you force Received: variable in mail()?

                    "NotGiven" <noname@nonegiv en.net> wrote in message
                    news:zVyKb.4436 6$yA6.3401@bign ews1.bellsouth. net...[color=blue]
                    > I downloaded a simple mailing list tool from hotscripts and here's the[/color]
                    meat[color=blue]
                    > of the sending engine with your siggestion added to the mail parameters:
                    >
                    > $headers = "From: \"".FROMNAME."\ " <".FROMEMAIL."> \r\n";
                    > $email['fromemail'] = "me@mydomain.co m";
                    > while ($row = mysql_fetch_arr ay($res2)) {
                    > $email_addr = $row[0];
                    > $fullmessage = $_POST[message];
                    > mail("$email_ad dr", "$_POST[subject]", $fullmessage, $headers, "-f
                    > {$email[fromemail]}");
                    > }
                    > echo "email sent!";[/color]


                    by the way, there needs to be quotes around the fromemail item in the -f
                    line



                    ok, I take it you are filling out a web page and waiting for it to send to
                    each user.

                    I would modify my mx mail script to relay throug local host and loop throug
                    after the connection is made


                    --
                    Mike Bradley
                    http://www.gzentools.com -- free online php tools


                    Comment

                    • NotGiven

                      #11
                      Re: how do you force Received: variable in mail()?

                      thanks.


                      "CountScubu la" <me@scantek.hot mail.com> wrote in message
                      news:LmzKb.6230 $X9.1086@newssv r27.news.prodig y.com...[color=blue]
                      > "NotGiven" <noname@nonegiv en.net> wrote in message
                      > news:zVyKb.4436 6$yA6.3401@bign ews1.bellsouth. net...[color=green]
                      > > I downloaded a simple mailing list tool from hotscripts and here's the[/color]
                      > meat[color=green]
                      > > of the sending engine with your siggestion added to the mail parameters:
                      > >
                      > > $headers = "From: \"".FROMNAME."\ " <".FROMEMAIL."> \r\n";
                      > > $email['fromemail'] = "me@mydomain.co m";
                      > > while ($row = mysql_fetch_arr ay($res2)) {
                      > > $email_addr = $row[0];
                      > > $fullmessage = $_POST[message];
                      > > mail("$email_ad dr", "$_POST[subject]", $fullmessage, $headers,[/color][/color]
                      "-f[color=blue][color=green]
                      > > {$email[fromemail]}");
                      > > }
                      > > echo "email sent!";[/color]
                      >
                      >
                      > by the way, there needs to be quotes around the fromemail item in the -f
                      > line
                      >
                      >
                      >
                      > ok, I take it you are filling out a web page and waiting for it to send to
                      > each user.
                      >
                      > I would modify my mx mail script to relay throug local host and loop[/color]
                      throug[color=blue]
                      > after the connection is made
                      >
                      >
                      > --
                      > Mike Bradley
                      > http://www.gzentools.com -- free online php tools
                      >
                      >[/color]


                      Comment

                      Working...