• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Website emailing problem

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Website emailing problem

    Been sorting a problem with manual spam sent from my website contact page and found another.

    If I enter my @gmail.com address in the email field the mail is sent but if I enter my @btinternet.com address it isn't. Can't see why that should be. The PHP code is:

    $title = "Web Site Enquiry";
    $headers = "From: $email\r\n";
    $headers .= "Reply-To: $email\r\n";
    $headers .= "MIME-Version: 1.0\r\nContent-type: text/plain; charset=iso-8859-1";
    $msg = "Mail sent via xxx website\r\n".$msg;
    mail($recipient,$title,$msg,$headers);

    Anyone see any reason why that's ok when $email is gmail but not BT?? Cheers.

    PS Nearly posted this in Light Relief. Complete senility coming soon.
    Last edited by xoggoth; 18 June 2018, 09:57.
    bloggoth

    If everything isn't black and white, I say, 'Why the hell not?'
    John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

    #2
    Are BT blocking email from your domain as spam?
    Originally posted by Stevie Wonder Boy
    I can't see any way to do it can you please advise?

    I want my account deleted and all of my information removed, I want to invoke my right to be forgotten.

    Comment


      #3
      Cheers SM. No, should have said this in post, nowt in spam/junk either locally or in webmail.

      $recipient in that code is [email protected] and the bt emails are all listed in the inbox.

      That is redirected to a gmail account and they are not in the gmail inbox. However, there is also nowt in the spam box as I would expect if gmail was blocking them.
      Last edited by xoggoth; 18 June 2018, 10:38.
      bloggoth

      If everything isn't black and white, I say, 'Why the hell not?'
      John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

      Comment


        #4
        Originally posted by xoggoth View Post
        Been sorting a problem with manual spam sent from my website contact page and found another.

        If I enter my @gmail.com address in the email field the mail is sent but if I enter my @btinternet.com address it isn't. Can't see why that should be. The PHP code is:

        $title = "Web Site Enquiry";
        $headers = "From: $email\r\n";
        $headers .= "Reply-To: $email\r\n";
        $headers .= "MIME-Version: 1.0\r\nContent-type: text/plain; charset=iso-8859-1";
        $msg = "Mail sent via xxx website\r\n".$msg;
        mail($recipient,$title,$msg,$headers);

        Anyone see any reason why that's ok when $email is gmail but not BT?? Cheers.

        PS Nearly posted this in Light Relief. Complete senility coming soon.
        Is this your own server?
        I.e. you have access to the SMTP logs?

        Or, are you sending to an SMTP server you don't control?
        Don't believe it, until you see it!

        Comment


          #5
          Originally posted by xoggoth View Post
          Cheers SM. No, should have said this in post, nowt in spam/junk either locally or in webmail.

          $recipient in that code is [email protected] and the bt emails are all listed in the inbox.

          That is redirected to a gmail account and they are not in the gmail inbox. However, there is also nowt in the spam box as I would expect if gmail was blocking them.
          Could you temporarily switch off the redirect and see if they are making it to the BT address, but just not being forwarded (again checking junk/spam there)
          …Maybe we ain’t that young anymore

          Comment


            #6
            Originally posted by xoggoth View Post
            Been sorting a problem with manual spam sent from my website contact page and found another.

            If I enter my @gmail.com address in the email field the mail is sent but if I enter my @btinternet.com address it isn't. Can't see why that should be. The PHP code is:

            $title = "Web Site Enquiry";
            $headers = "From: $email\r\n";
            $headers .= "Reply-To: $email\r\n";
            $headers .= "MIME-Version: 1.0\r\nContent-type: text/plain; charset=iso-8859-1";
            $msg = "Mail sent via xxx website\r\n".$msg;
            mail($recipient,$title,$msg,$headers);

            Anyone see any reason why that's ok when $email is gmail but not BT?? Cheers.

            PS Nearly posted this in Light Relief. Complete senility coming soon.
            I take it $email is the email address that has been entered on the form?

            If so that's really not good practice and Im surprised that it works with any address other than one that is local to the mail server.

            Normally a mail server (more accurately an SMTP server) would be configured only to accept emails where the senders domain matches that of the authenticated user*.. What mail server are you sending through? I assume that from your point of view it is "localhost" if thats the case you need to find out where localhost is relaying to as thats likely to be where your problem is.

            * Doing otherwise would open the server up to all sorts of abuse and would quickly get it added to one of the many blacklists - which also might be the issue, check your mail server isnt blacklisted some providers simply wont accept email from blacklisted mail servers so it wont even show as spam.
            Last edited by Snarf; 19 June 2018, 12:25.

            Comment


              #7
              Cheers all. I meant forwarded not redirected. Ill have a go at these. With Hostpapa, not sure where I'll find logs but have a look and also change the headers to match the server.

              Without any rebounds or spam it's hard to see which particular spam checker is blocking things.
              bloggoth

              If everything isn't black and white, I say, 'Why the hell not?'
              John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

              Comment


                #8
                Changed headers and seems ok now. Not sure how I made that mistake, onlne ordering emails all correct, just that little contact thing.

                Also seem to have all the blocked emails on hosting webmail now. Weren't there yesterday.

                Cheer again all.
                bloggoth

                If everything isn't black and white, I say, 'Why the hell not?'
                John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

                Comment

                Working...
                X