Jump to content

Archived

This topic is now archived and is closed to further replies.

witt

mail function

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Also the mail might be sent and saved in a folder called spam or somethink of that nature.
check? ..................

Share this post


Link to post
Share on other sites
No, it's not being categorized as spam. How could I ensure that the mail arrives instantly?

Share this post


Link to post
Share on other sites
You just cant. It's has nothing to do with you or your server.

Orio.

Share this post


Link to post
Share on other sites
So what if you need to have an account activated? How do sites send these emails to hotmail addresses?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
If you have something else to ask, open a new thread!

Orio.

Share this post


Link to post
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. 

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
They can, but I said they cant verify if you clicked the link from the email you got or guessed it in some way.

Orio.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Anyone can tell me how to extract the information from the database and send an email to the repective people? Thanks.

Share this post


Link to post
Share on other sites

×

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.