Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Emmanuel Petit
June 25, 2007, 5:07 pm
rate this thread
I use PHP 5.2.1
Here is an extract of the script which causes me problems.
//email of recipient
//tracking email to the webmaster of the site
mail($dd, 'Activation',$details, 'From: email@example.com');
//prepar the body of the mail
$body = $name . ',';
$body .= "\n\nThank you for activating your account:\n\n\n";
$body .="http://www.testsite.com/fr/activation.php?x =$ts";
$body .= "\n\nSee you soon on www.testsite.com.";
//send the mail
mail($ea, 'Mail activation',$body, 'From: firstname.lastname@example.org');
//second tracking email to webmaster of the site
$details="Mail sent to $ea";
mail('email@example.com', 'Activation',$details, 'From:
The problem :
I create a test user, fill out all the details giving one of my email
adress, on my own PC (but doing it on the live web site NOT IN LOCAL),
and click the activate button on the form. The script runs perfectly,
and after a few second I get the email in my mail box with the
In the webmaster mailbox, I get the two tracking email. So far, so good.
Now, the webmaster create a user. This user on a different machine (two
users in differents places tried and had the problem), goes through the
same activation process, fills in his email address, and click the
activate button. He never receives his activation mail, but the
webmaster still gets the two tracking mails.
I tried on different machines, with different users, without success.
Can someone help me?
Re: mail problem
The webserver you use might be on a blacklist and so somedomain.com
might block the email, the web hosting company you use might not allow
mails to be sent to other domains other than yours, in other words the
pop email server you use might be ok cos its on the "same network" as
Try using phpmailer instead and send you email via an authenticaed
smtp server, using an account you set up to act as the originating
account whever your server sends out emails. This way the email is
less likely to be seen as spam, and you are not at the mercy of other
users of your webserver which might be trying to send spam.