Jump to content


Photo

mail function


  • Please log in to reply
14 replies to this topic

#1 witt

witt
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 30 June 2006 - 06:35 AM

I this script which is supposed to send an email.

$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');

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?

#2 heckenschutze

heckenschutze
  • Members
  • PipPipPip
  • Advanced Member
  • 257 posts
  • LocationAustralia

Posted 30 June 2006 - 06:54 AM

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.

#3 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 30 June 2006 - 07:02 AM

Also the mail might be sent and saved in a folder called spam or somethink of that nature.
check? ..................
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#4 witt

witt
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 30 June 2006 - 02:32 PM

No, it's not being categorized as spam. How could I ensure that the mail arrives instantly?

#5 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 30 June 2006 - 03:46 PM

You just cant. It's has nothing to do with you or your server.

Orio.
Think you're smarty?

(Gone until 20 to November)

#6 witt

witt
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 30 June 2006 - 04:17 PM

So what if you need to have an account activated? How do sites send these emails to hotmail addresses?

#7 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 30 June 2006 - 04:21 PM

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.
Think you're smarty?

(Gone until 20 to November)

#8 eunicewt

eunicewt
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 30 June 2006 - 05:13 PM

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.

#9 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 30 June 2006 - 05:15 PM

If you have something else to ask, open a new thread!

Orio.
Think you're smarty?

(Gone until 20 to November)

#10 mac.php

mac.php
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 30 June 2006 - 05:17 PM

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.


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. 

#11 witt

witt
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 30 June 2006 - 08:06 PM

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.


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?

#12 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 30 June 2006 - 08:29 PM

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.
Think you're smarty?

(Gone until 20 to November)

#13 witt

witt
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 30 June 2006 - 08:35 PM

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.

#14 eunicewt

eunicewt
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 01 July 2006 - 02:59 PM

Anyone can tell me how to extract the information from the database and send an email to the repective people? Thanks.

#15 witt

witt
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 01 July 2006 - 09:43 PM

Any ideas?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users