Jump to content

Recommended Posts

I this script which is supposed to send an email.

[code]$body = "Thank you for registering. To activate your account, please click on this link:\n\n";
$body .= "http://{$_SERVER['HTTP_HOST']}/activate.php?a=$active";
mail($_POST['email'], 'activate', $body, 'From: donotreply@site.com');[/code]

It works perfectly fine for all email addresses, except for hotmail. When sending to a hotmail address, the email only shows up in the inbox after many hours. Yahoo, AOL, GMail, etc., all receive the emails instantly with no delay. Any ideas?
Link to comment
https://forums.phpfreaks.com/topic/13265-mail-function/
Share on other sites

Some mail providers don't like hosts with dynamic IP addresses, hotmail is a good example. If your host has a dynamic IP, then hotmail may completly ignore your mail, or if your lucky, take many hours to recieve.

The reason why so many hosts reject Dynamic IPs, is that most spam bots and alike, have and use dynamic IPs so it is harder for them to be banned. So hotmail figures if your a reputeable mail host you will have a static IP.

Note: You should also be sending some mail headers with your mail. (not just from:).

HTH.
Link to comment
https://forums.phpfreaks.com/topic/13265-mail-function/#findComment-51066
Share on other sites

Hi,
  It is a school project.I want to know how to send an email notification to this manager after the user has edited its profile and pressed the add button. It not only update the database but it also sends out an email to inform the manager as well? Anyone can help me? I am super stress by the codings.
Link to comment
https://forums.phpfreaks.com/topic/13265-mail-function/#findComment-51340
Share on other sites

[quote author=eunicewt link=topic=98963.msg389789#msg389789 date=1151687602]
Hi,
  It is a school project.I want to know how to send an email notification to this manager after the user has edited its profile and pressed the add button. It not only update the database but it also sends out an email to inform the manager as well? Anyone can help me? I am super stress by the codings.
[/quote]

post a new thread man.  :(  anyways it isn't the message board's doing, those servers may just have static ips.  There isn't a way to make the mail deliver any faster.  You can try a healthy alternatitive, such as image verification, or just warning users about the hotmail problem. 
Link to comment
https://forums.phpfreaks.com/topic/13265-mail-function/#findComment-51342
Share on other sites

[quote author=Orio link=topic=98963.msg389758#msg389758 date=1151684503]
They ask you to press a link if you want to activate your account. They have no idea if you checked your email or lets say guessed it.

Orio.
[/quote]

An activation code is generated when a user registers. That activation code is then sent to the email address provided by the user. The user is supposed to read the email with the activation code, and click on a link provided in the email. Once they click on the link, their activation code is verified and if it matches the one in the database, their account gets activated. There are tons of sites that use an email verifaction methods like this. Are you telling me that none of the thousands of sites that employ a method like this can send emails to hotmail addresses?
Link to comment
https://forums.phpfreaks.com/topic/13265-mail-function/#findComment-51412
Share on other sites

The activation code is a randomly generated 32 character long string so I doubt someone would guess it. But that is not what I'm asking about. Lets say that I want to send an email upon registration. The email would say 'Hello'. How would I make sure that hotmail addresses receive this message within a few minutes? Like I said, there are many sites that do such thing, so I know it can be done.
Link to comment
https://forums.phpfreaks.com/topic/13265-mail-function/#findComment-51431
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.