email address on form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • CarbonTerry
    Major General

    • Oct 2005
    • 2620

    email address on form

    I have my form and confirmation page working as needed, however the email that is forwarded to me from orders@xxxxx.com is identified as an "unknown sender" and is promptly put onto the spam folder. What do I need to do to solve this?
    www.artelicious.com
    CarbonTerry
    Semper Fi
    Still green...still mean......just not as lean

    Red Hawk Archery
    Zone 5 Photo
    My USMC
  • Andy128
    Major General

    • Dec 2005
    • 2317

    #2
    Re: email address on form

    That is an excellent question! I suppose that you could have your spam blocker accept the "unknown sender" but that would defeat the purpose of the spam blocker.

    I do not know which code to modify to list an e-mail address so that it would have an address to reference.

    If I know this board though- an answer will be along shortly.

    Andy
    Sorry couldn't be of help.
    PHP- is a blast!

    Comment

    • CarbonTerry
      Major General

      • Oct 2005
      • 2620

      #3
      Re: email address on form

      Anyone?
      CarbonTerry
      Semper Fi
      Still green...still mean......just not as lean

      Red Hawk Archery
      Zone 5 Photo
      My USMC

      Comment

      • Nyoman
        Major

        • Sep 2005
        • 426

        #4
        Re: email address on form

        you need a php script which will pick up value of email field to be a sender.
        this is just a simple php script for that, if you like you can use it. save it as i.e feedback.php or somethingelse
        Code:
        <?
        if ((!$name) || (!$email) || (!$comments))
        {
            $display .= '<p align="center">[COLOR=red]All fields are required.  Please check your information and try again.[/COLOR]</p>';
         $display .= '<p align="center"><a href=javascript:history.back()>Go back</a></p>';
        }
        else{
        $name = $_POST['name'];
        $email = $_POST['email'];
        $comments = $_POST['comments'];
         
        $recipient = "[EMAIL="yourmail@yourdomain.com"]yourmail@yourdomain.com[/EMAIL]";
        $subject = "[COLOR=red]Feedback from website[/COLOR]";
        $forminfo = 
        (
        $name . "\r" .
        $email . "\r" .
        $comments . "\r\n" .
        date("M-d-Y") . "\r\n\n"
        );
        $formsend = mail("$recipient", "$subject", "$forminfo", "From: $email\r\nReply-to:$email\r\n");
        $display .= [COLOR=red][COLOR=black]'[/COLOR]here you can add with html code of your respons/thank you page[/COLOR]';
        }
        ?>
        <? echo $display; ?>
        .
        .
        Nyoman

        Comment

        • Andy128
          Major General

          • Dec 2005
          • 2317

          #5
          Re: email address on form

          Nyoman-
          Please forgive me for possibly asking a stupid question- but do you use the above code instead of this:
          <script language="php">
          $email = $HTTP_POST_VARS[email];
          $mailto = "
          email@address";
          $mailsubj = "Form submission";
          $mailhead = "From: $email\n";
          reset ($HTTP_POST_VARS);
          $mailbody = "Values submitted from web site form:\n";
          while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n"; }
          if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
          </script>


          And- what do you mean by;
          'here you can add with html code of your respons/thank you page'

          I am not that code savoy. Thanks in advance.

          Andy
          PHP- is a blast!

          Comment

          • CarbonTerry
            Major General

            • Oct 2005
            • 2620

            #6
            Re: email address on form

            This is the code that I sued on my page. It is on the response page. Should it be on the form page?

            <?PHP
            $email = $HTTP_POST_VARS[email];
            $mailto = "orders@artelicious.com";
            $mailsubj = "Feedback form";
            $mailhead = "From: $email\n";
            reset ($HTTP_POST_VARS);
            $mailbody = "Values submitted from web site form:\n";
            while (list ($key, $val) = each ($HTTP_POST_VARS))
            {
            $mailbody .= "$key : $val\n";
            }
            mail($mailto, $mailsubj, $mailbody, $mailhead);
            ?>

            CarbonTerry
            Semper Fi
            Still green...still mean......just not as lean

            Red Hawk Archery
            Zone 5 Photo
            My USMC

            Comment

            • Andy128
              Major General

              • Dec 2005
              • 2317

              #7
              Re: email address on form

              Carbon Terry,

              You are correct- That code would be placed on the response page.
              You did nothing wrong in the way you did your pages.

              Nyoman posted a different script which I am wondering if it is to be used in place of the script you and I posted. I believe his script is to correct it showing up as unknown sender in your mail box.

              Andy
              PHP- is a blast!

              Comment

              • Nyoman
                Major

                • Sep 2005
                • 426

                #8
                Re: email address on form

                I didn't use that script for my web, but you can use as a feedback php to handle your form. if you add more field in your form you also need to add it in that script. in example $phone, $adress etc.
                Nyoman-
                Please forgive me for possibly asking a stupid question- but do you use the above code instead of this:
                yes it is
                And- what do you mean by;
                'here you can add with html code of your respons/thank you page'
                simple way, view source or edit the html of your thank you page, copy and paste it there, so when you click submit your thank you page will appear normally like the original page
                Originally posted by Carbon Terry
                This is the code that I sued on my page. It is on the response page. Should it be on the form page?
                you can use my code instead of it. copy as feedback.php using notepad and upload to public_html
                .
                .
                Nyoman

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  Re: email address on form

                  I apologise for getting in the middle. The script Andy has used and Carbon Terry has adopted, has the visitor's email address to be the "from" tag, so there should not be any "Uknown sender" issue, UNLESS you have named the form email field something else than "email" . If you have named it "Email", or "email address" or ANYTHING else rather than "email", you have to correct the "From" line accordingly. F.e. if the field is named "Email Address", you should change the code as follows:
                  $email = $HTTP_POST_VARS[Email Address];
                  $mailto = "your vodahostaccount email adress";
                  $mailsubj = "Form submission";
                  $mailhead = "From: $email\n";


                  This way the FROM tag will contain your visitor's email.

                  It is important to understand that the

                  $email = $HTTP_POST_VARS[Email field name];

                  line must have in the second part, the field name.
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment

                  • Nyoman
                    Major

                    • Sep 2005
                    • 426

                    #10
                    Re: email address on form

                    absolutely agree

                    Hi Naval
                    .
                    .
                    Nyoman

                    Comment

                    • navaldesign
                      General & Forum Moderator

                      • Oct 2005
                      • 12080

                      #11
                      Re: email address on form

                      Hi Nyo. How are you?


                      Hi Andy, since you took the trouble of setting up this beautifull tutorial, you might as well want to state the above, so members that will use your tutorial in the future will not have this problem. This, as well as the email address to use for sending the form info, have not been clear enough in the past, so it would be nice if you can do it.

                      Thanks
                      Navaldesign
                      Logger Lite: Low Cost, Customizable, multifeatured Login script
                      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                      Comment

                      • CarbonTerry
                        Major General

                        • Oct 2005
                        • 2620

                        #12
                        Re: email address on form

                        Thanks to all three of you for walking me through this.
                        CarbonTerry
                        Semper Fi
                        Still green...still mean......just not as lean

                        Red Hawk Archery
                        Zone 5 Photo
                        My USMC

                        Comment

                        • Andy128
                          Major General

                          • Dec 2005
                          • 2317

                          #13
                          Re: email address on form

                          Naveldesign and others-

                          I apologize for any confusion I may have caused. Navel- I have updated the tutorial- please check it for accuracy and clairty for me.

                          This should end the problem of unknown sender occuring and the question of the order in which info appears in someones e-mail.

                          It must have worked out by fluke that my alphabetic/numeric order solution worked with my form. I have deleted that mis-instruction.

                          regards-

                          Andy
                          PHP- is a blast!

                          Comment

                          • navaldesign
                            General & Forum Moderator

                            • Oct 2005
                            • 12080

                            #14
                            Re: email address on form

                            You absolutely need not apologise. You have saved lots of time for many users. Cheers!
                            Navaldesign
                            Logger Lite: Low Cost, Customizable, multifeatured Login script
                            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                            Comment

                            Working...
                            X