Not receiving emails

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • nimrod
    Private First Class

    • Nov 2007
    • 7

    Not receiving emails

    Hi Guys,

    client id 19735
    I am having problems with my form. When someone enters details on the form and hits the submit button, they get the thank you page but I do not receive an email. I have tried several different email addresses but none of them work.
    I have added the php code, which I copied from the tutorial, for you to look at

    <?PHP
    $mailto = "nimrod945******.com.au.";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "information 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))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>

    Any help greatly appreciated
  • Andy128
    Major General

    • Dec 2005
    • 2317

    #2
    Re: Not receiving emails

    It would be most helpful if you posted your site so we can check the form make-up also..........but, there is one problem that I noticed in your php code and it is in this line;
    $mailto = "nimrod945 ******.com.au.";


    There should not be a period after the .au

    Correct that and see if it works.

    Andy
    PHP- is a blast!

    Comment

    • nimrod
      Private First Class

      • Nov 2007
      • 7

      #3
      Re: Not receiving emails

      Thanks Andy, Something as simple as a . and I didn't notice it. It had been driving me nuts!
      It works great now. Thanks for your help.
      The url is videlle.com.au A simple site to try and pique interest.

      Comment

      • Andy128
        Major General

        • Dec 2005
        • 2317

        #4
        Re: Not receiving emails

        Glad to help.

        Andy
        PHP- is a blast!

        Comment

        • stringbender
          Master Sergeant

          • Dec 2007
          • 60

          #5
          Re: Not receiving emails

          Hi Andy, I'm having the same problem as nimrod with www,eyeonyouinvestigations.net. I've posted my php code maybe you can spot something simple I've over looked. My eyes are getting really tired from looking. Thanks, Brad
          <?PHP
          $mailto = "bdmorrow141@msn.com";
          $email = $HTTP_POST_VARS['email'];
          if ($email == "") {
          $email = $mailto;
          }
          $mailsubj = "Contact 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))
          {
          if ($key!="submit")
          {
          $mailbody .= "$key : $val\n";
          }
          }
          mail($mailto, $mailsubj, $mailbody, $mailhead);?>

          Comment

          • Andy128
            Major General

            • Dec 2005
            • 2317

            #6
            Re: Not receiving emails

            Brad-

            The php code looks correct as far as I can see. Where on your site is the form? I would like to see it to see if the problem is in the form.

            Andy
            PHP- is a blast!

            Comment

            • stringbender
              Master Sergeant

              • Dec 2007
              • 60

              #7
              Re: Not receiving emails

              Thanks Andy, The form is on the contact us page. Brad

              Comment

              • Andy128
                Major General

                • Dec 2005
                • 2317

                #8
                Re: Not receiving emails

                Brad-
                I assume that the above php script is placed in the page properties>page html and placed "Inside Body" tab of the action.php page.

                If that is correct- then the page should be sending you e-mails. However, it could be that msn is blocking it or it is showing up in your junk mail. Check to make sure not going into junk/spam.

                To test- create a mail account in your VH server account via Cpanel. Then modify the php script to reflect the newly created e-mail address.
                Save and publish and then test. If you receive the email then it is possible that msn is blocking you. If you don't- then post back.

                Andy
                PHP- is a blast!

                Comment

                Working...
                X