- Impact
- 0
Ive been a php programer for 3 years now, and one of the things that really upsets me is the mail feature. I have built a few sites, and every single one of them requires a email being sent to the users address so that they can verify their account.
I have tried many different method's to send emails to users, but there is always that one that doesnt recieve their email.
Has anyone out there rather then me run into this problem as well?
Is there a solution to this problem?
Here is what ive been using. They seem to work fine except for the bottom one, that one seems to be broken, but ive never modified it. Each time a user signs up, both of these functions are called, just incase one doesnt work. What are some codes you guys use to email your users, and do you get any problems emailing them?
function mail1 ($subject, $message, $email){
mail("$email", "$subject", $message,
"From: WH Entertainment <[email protected]>\n"
."Reply-To: [email protected]\r\n"
."X-Mailer: PHP/" . phpversion());
}
function mail2 ($subject, $message, $email){
$MP = "/usr/sbin/sendmail -t";
$fd = popen($MP,"w");
fputs($fd, "To: $email\n");
fputs($fd, "From: WH Entertainment <[email protected]>\n");
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, $message);
pclose($fd);
}
I have tried many different method's to send emails to users, but there is always that one that doesnt recieve their email.
Has anyone out there rather then me run into this problem as well?
Is there a solution to this problem?
Here is what ive been using. They seem to work fine except for the bottom one, that one seems to be broken, but ive never modified it. Each time a user signs up, both of these functions are called, just incase one doesnt work. What are some codes you guys use to email your users, and do you get any problems emailing them?
function mail1 ($subject, $message, $email){
mail("$email", "$subject", $message,
"From: WH Entertainment <[email protected]>\n"
."Reply-To: [email protected]\r\n"
."X-Mailer: PHP/" . phpversion());
}
function mail2 ($subject, $message, $email){
$MP = "/usr/sbin/sendmail -t";
$fd = popen($MP,"w");
fputs($fd, "To: $email\n");
fputs($fd, "From: WH Entertainment <[email protected]>\n");
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, $message);
pclose($fd);
}
Last edited:















