Form results mailed to me in an attachment

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

    #1

    Form results mailed to me in an attachment

    I have a form which customers can fill in whenever they have got products
    which they want to be anodised. Everything works fine and in addition to the
    email I get out of my formmail.php, I would also like to get an attachment
    with that email which also contains the results. I want to use that file for
    further processing the customers orders in my database. So the file should
    be delimited by tabs of comma's.

    Does anyone know if there is an function which can be added in the
    formmail.php so this will be possible?
    I'm using formmail.php form Andrew Riley (with Don's update)

    WiseGuy


  • Brendan Donahue

    #2
    Re: Form results mailed to me in an attachment

    WiseGuy wrote:
    [color=blue]
    > I have a form which customers can fill in whenever they have got products
    > which they want to be anodised. Everything works fine and in addition to
    > the email I get out of my formmail.php, I would also like to get an
    > attachment with that email which also contains the results. I want to use
    > that file for further processing the customers orders in my database. So
    > the file should be delimited by tabs of comma's.
    >
    > Does anyone know if there is an function which can be added in the
    > formmail.php so this will be possible?
    > I'm using formmail.php form Andrew Riley (with Don's update)
    >
    > WiseGuy[/color]
    Yes, an attachment can be added to the email using headers. Just search
    over at http://php.net and http://google.com
    There are already dozens of tutorials/scripts for doing this.

    Comment

    • Wiseguy@work

      #3
      Re: Form results mailed to me in an attachment


      "Brendan Donahue" <wizard@wizards ofwebsites.com> schreef in bericht
      news:uIednV_vyt j4gh_dRVn-jg@comcast.com. ..[color=blue]
      > WiseGuy wrote:
      > Yes, an attachment can be added to the email using headers. Just search
      > over at http://php.net and http://google.com
      > There are already dozens of tutorials/scripts for doing this.[/color]

      Let's try a search on headers then. But maybe someone have a suggestion
      on a specific script?


      --
      Posted by news://news.nb.nu

      Comment

      • Wiseguy@work

        #4
        Re: Form results mailed to me in an attachment


        "Brendan Donahue" <wizard@wizards ofwebsites.com> schreef in bericht
        news:uIednV_vyt j4gh_dRVn-jg@comcast.com. ..[color=blue]
        > Yes, an attachment can be added to the email using headers. Just search
        > over at http://php.net and http://google.com
        > There are already dozens of tutorials/scripts for doing this.[/color]

        I've tried searching for scripts and I think that I will have to take it one
        step at a time. First I need to know how to get my form results in a text
        file.
        For that I found the following:

        <?php
        $file = @fopen("/order.txt", 'a+');
        if ($file == false) {
        // could not open the file, so handle the error
        }
        else {
        $buffer = "what you have to write\n";
        $written = fwrite($file, $buffer);
        fclose($file);

        // check everything is ok
        if ($written != strlen($buffer) ) {
        // oops, there was a problem
        }
        }

        ?>

        But this doesn't write anything to my file called "order.txt" . Although I
        set
        the permissions on that file to 777. Does someone no what's wrong?


        --
        Posted by news://news.nb.nu

        Comment

        Working...