Jump to content

Laurie_Hedge

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Laurie_Hedge

  1. Hi mac_gyver. Thanks for your help with this. Unfortunately it's not always being sent to the same email address, so I do think I need to send via my mail server. Given that the emails to the Gmail account are getting through, that surely means that the emails are being sent, right? I must admit I'm not at all well versed in how the PHP mail() function actually works, but I started digging into it and I'm a little confused. I started by looking at the raw headers of the emails I did receive from the website in Gmail, and I noticed that the ip address is listed as 94.136.40.100, which when I ran it through a reverse-DNS search returned outbound-traffic.linweb.ahost.me, which is a) completely unfamiliar to me, and b) on at least one blacklist. So this certainly looks like a problem to me, because aside from being on a blacklist, it will also not match up with the address in the "from" field of the header. Is there any chance you could explain to me, or point me towards something that explains, what exactly is happening here? I would have expected the ip of my emails to be the same as the ip of the server on which the PHP script was running (i.e. my website's ip), but evidently I'm wrong. Why would this be? And is there anything I'm likely to be able to do about it given that I'm on a cheap shared web hosting package?
  2. Hi ginerjm. Yes I've sent emails from two different Gmail accounts to both of the btinternet accounts I've been testing with, and those emails get through absolutely fine. I'm also on a number of mailing lists on the btinternet accounts, and I receive all the emails from those too.
  3. Hi, I'm new to these forums, so I hope I'm putting my question in the right place. Anyhow I've had a simple PHP email function that I've been using for a while, but I discovered today that it appears that emails sent using this function don't arrive when sent to @btinternet.com addresses. Gmail however receives them fine. I find this strange, as the mail function appears to return correctly, so it's definitely being sent. However the email is not being put into spam or even moved to trash, it simply doesn't arrive. I've also added the "Return-path" parameter to the header in the hopes of getting an error from the server, but I never receive anything back indicating that anything has gone wrong. For testing, I've pulled my code out into its own page which contains only the following (except with real email addresses). <?php function email($to, $subject, $message, $from) { $headers = "From: $from\r\nReturn-path: $from\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=utf-8\r\n"; $message = wordwrap($message, 70); return mail($to, stripslashes($subject), stripslashes($message), $headers); } if (email("[email protected]", "Testing...", "This is a test email...", "[email protected]")) echo "Sent OK."; else echo "Send failed."; ?> This code works fine when I send to a Gmail address, but when I send to a btinternet address (I've tried 2), as I described, it just never arrives. I've been trying all kinds of things, like changing between "\r\n" and "\n" for the headers, changing the content type, adjusting the word wrap etc., but nothing helps the problem. I've also checked my website's IP to see if it's been blacklisted (I'm on shared web hosting), but it appears to be fine. For the record, my web host is 123-Reg. I was wondering whether anyone has encountered anything like this before, and if you have any suggestions for what else I might try? Thanks in advance! Laurie
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.