oconkero Posted March 15, 2007 Share Posted March 15, 2007 I have a php mail script that lets users register and then it emails the username and pass along with an activation url but thats besides the point... i know it works on my shaw provided email and as well and gmail but not msn... doesnt even show up in junk... i have tried scripts and scripts but none work, well one did help me make the email show up and non-junk when recieved by shaw so im getting there but still nothing in msn... heres the just of the code. $mailheaders = "From: $domain\n"; $mailheaders .= "Your account has been created.\n"; $mailheaders .= "Please activate your account now by visiting ...\n"; $mailheaders .= "\n"; $mailheaders .= "Username: $_POST[username]\n"; $mailheaders .= "Password: $_POST[password]"; $to = "$_POST[email]"; $subject = "Please activate your account"; $headers = "From: <$adminemail>\n"; mail($to, $subject, $mailheaders, $headers, "Reply-to: <$adminemail>"); Quote Link to comment Share on other sites More sharing options...
per1os Posted March 15, 2007 Share Posted March 15, 2007 Mail headers need to have \r\n after not just \n and is only needed if there are multiple headers, the last line should not have \r\n Either way, some email hosts choose to block mail sent by php. MSN is definitely one who at least filters them in a junk mailbox. There is no real way to get around it. My webhost is blocked by AOL, so I disallowed AOL email accounts on my site. Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 15, 2007 Share Posted March 15, 2007 Hi Oconkero! I actually have the same problem with you and am looking for a solution. Please read this thread by me before: http://www.phpfreaks.com/forums/index.php/topic,131130.0.html I have a script that send an email to myself. When the recipient's email was either hotmail / yahoo, they won't be able to receive the email. I tried to send to another email of mine (not hotmail / yahoo), and it worked like charm. My assumption is either Yahoo and Hotmail has automatic delete on their server to prevent spammer. But, my question is: how can we send an email, let's email verification / password reset, to our clients that are using hotmail / yahoo? Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 15, 2007 Share Posted March 15, 2007 Updated! I tried this thread below: http://www.phpfreaks.com/forums/index.php/topic,87238.0.html It works now. Now, at least it can send to Yahoo! mail, but it goes to Bulk mail. Still can't get it work for Hotmail. Quote Link to comment Share on other sites More sharing options...
todayme Posted March 15, 2007 Share Posted March 15, 2007 Make sure when that the email is sent from someone that is an email that is valid, the way php is setup on my server it sends the email from admin@mydomain.com if you dont have it sent from someone Hotmail will not except it as incoming. It is a configuration on some mail servers. Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 15, 2007 Share Posted March 15, 2007 Yes, I did try sending using valid email address, but it still won't reach my hotmail. It reached my Yahoo email already, but Hotmail still not receiving anything. This is useful link for somebody that has same problem: http://www.ibdhost.com/contact/ THanks!!! Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 15, 2007 Share Posted March 15, 2007 One thing I learned was to include as much information in Header as you can. This will avoid spam filter that many email providers have. Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 16, 2007 Share Posted March 16, 2007 I have tried to add the following header, but it still doesn't work. The email still won't send to my hotmail. $headers = 'From: ' . $email . "\r\n" . 'Reply-To: ' . $email . "\r\n" . 'MIME-Version: 1.0' . "\r\n". 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); Can somebody help me out please? Thanks a lot guys!! Quote Link to comment Share on other sites More sharing options...
oconkero Posted March 16, 2007 Author Share Posted March 16, 2007 Yeah ive been trying and trying scripts what i think im gonn do because all the scripts out there a litteraly garbage to me cuz i nede one with md5 or better password hashes that uses mysql that is Not vuln to sql injections and uses email verification by sending an activation link... so im just gonna install phpbb2 on my site and rip the login and registration and config pages and then change the format a bit. first step) see if imsn recieves emails from ppl that register with phpbb forums. maybe you guys could fdo this too... after all i know that phpbb is really really secure, it blockes sql injections for one. thanks for all your help guys and girls Quote Link to comment Share on other sites More sharing options...
oconkero Posted March 16, 2007 Author Share Posted March 16, 2007 Update: well i verified that phpbb3 beta 5 i think is not vuln to sql injections and it uses md5 password hashes with mysql... but sadly still no msn emails recieved. but i noticed if you copy the url after logging in it has the ?sid=dsguidfghusidghluahsufaishg <- random but you can open another window or IE and copy and paste, bam logged in... doesnt seam that secure to me ill take a look at phpBB2 see if it has the same vulnerability Update: hmm yes it seams to me after loggin in on phpBB3 b5 it create a sid varible and if some1 gets it while your logged in the too can use your account, but a new one is generated every time you login... Quote Link to comment Share on other sites More sharing options...
per1os Posted March 16, 2007 Share Posted March 16, 2007 Well yes another window in IE if you opened the original page in IE, try pasting it into Firefox or another browser and see if it works. Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 16, 2007 Share Posted March 16, 2007 You need to setup your SMTP server IP Address with MSN, they have in-house developed technologies that filter email, although M$ wont reveal how it works, you can submit a request to add your server to there "safe list", you can do so by visiting https://postmaster.live.com/snds/ Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 Hi! Yeah, oconkero, please try to paste the url to another browser, like firefox. Or better yet, try to paste it to another computer, I don't think it will work. The SID probably related to the cookies stored in your machine. Plus, PHPbb3 is still beta. They may fix this problem once they have released the final version. This email things can never work around MSN. I have tried many many headers, read other threads and they all say the same thing, can't get it work with MSN. I think we shaunrigby was right. But, if we need to register our mail server with MS's 'safe list', I assume that would take long time. We, on the other hand, can't block anybody with hotmail account from our website. We know that hotmail users are so many. I am one of them. Thanks guys!!! Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 17, 2007 Share Posted March 17, 2007 The MSN junk mail filter is systematic, follow thie link , https://postmaster.live.com/snds/addnetwork.aspx, and add your SMTP server IP address, if you use more than 1 enter the range. FAQ for the service can be found here; https://postmaster.live.com/snds/FAQ.aspx i am pretty sure that this is the answer, i have this problem, and because i do not have a dedicated server i am unable to do it because my smtp server is shared, and according to my web host ihave to supply my own SMTP server, good news is tho there are many free smtp severs out there Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 Hi Shaunrigby, I am also using shared hosting which I thought would not be able to add to MS server. Why can't we add the shared SMTP server, does the MS Server disallow this? I do a quick search on google for FREE SMTP Server. The results are software that will send an email using our machine's smtp instead of our ISP's SMTP Server. This is typically used by travelers that can't really use their ISP's SMTP Server when they go travel. I don't think this kind of software is what we are after here. This kind of software only use our machine as SMTP server, and I don't think we can install it in to our shared hosting. If you have GMAIL account, you can actually use google SMTP server to send email out. Use smtp.google.com, but you have to provide your gmail account and password. The question here is, how can we use our own SMTP Server in shared hosting server? Thanks guys!!! Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 17, 2007 Share Posted March 17, 2007 use ini_set() and ini_restore() Im not too sure about how Smart Network Data Services works, best option would beto read the FAQ i posted a couple of posts up. Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 Here's the link for those who need ini_set() function description: http://www.php.net/manual/en/function.ini-set.php So, the idea is to change the SMTP server setting in PHP.ini. What variable name do I need to change? On the description of ini_set(), it says that the original value will be restored automatically at the end of the script. So, what I have in mind is to change the value everytime we need to send out a mail. Then, it will be changed back later on. Do you have any idea? Thanks shaunrigby! Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 17, 2007 Share Posted March 17, 2007 Yes that is what you can do, have you tried adding your SMTP server IP to the SNDS Network? Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 No, not yet. I also believe that that is the best way to go. Like I said earlier, I also use shared hosting. If I add it to SNDS Network, I think the whole shared hosting will be in the safe list. I don't know. Are we not be able to add our SMTP server to SNDS Network if we have shared hosting? Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 17, 2007 Share Posted March 17, 2007 I would reccomend to the mod for this post to be made sticky as itmay solve a lot of hotmail problems. Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 Yes, I agree with it. Many of the PHP coders have problem with sending email to MSN Hotmail users. I tried to search the topic about mail() and MSN Hotmail in this forum, but there is no real solution to each of the thread I read. So, it will be great if we can make this sticky. I go briefly on SNDS FAQ, and I realize that they have very tight and strict security to prevent spam, malware and virus send by emails. That's why they have SNDS. It's really useful and effective way to prevent such things, but it's a hassle for coders to work around with them. Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 Shaunrigby, did you receive an error message when tried to add your shared SMTP server to SNDS Network? Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 17, 2007 Share Posted March 17, 2007 What is the error message? Quote Link to comment Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 No, I haven't submitted my application yet. I was asking you did you receive any error message since you said that you were unable to add your SMTP server to SNDS network because you have shared SMTP Server. So, did you receive it any error message, or have you not tried it yet? Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 17, 2007 Share Posted March 17, 2007 Oh, no error message, just my e-mail address wasnt enlisted on the IP entered for my mailserver Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.