Thread: problem with function mail()
Results 1 to 7 of 7
Related
-
Problem with mail-script Forum: PHP Forum
Replies: 0 -
Function not defined problem Forum: Javascript Forum
Replies: 1 -
mysql query / function problem.... Forum: Databases
Replies: 7 -
PHP Form Mail Problem Forum: PHP Forum
Replies: 30 -
Send Mail Problem Forum: CGI Perl Forum
Replies: 11
-
01-10-2005, 08:29 AM #1
problem with function mail()
If I want to send emails to yahoo or gmail with the function mail, there is no problem. But if I want to send emails to email removedfor example, the mail is not received (maybe the mail is not sent). How can I solve this problem?
Last edited by HTML; 01-10-2005 at 09:24 AM.
-
01-10-2005, 09:25 AM #2
Have ytou checked if your ip is on a spam list and maybe blocked?
Dave
-
01-10-2005, 09:57 AM #3
My ip is not blocked, because I receive mails from the same host/machine, but with another script.
-
01-10-2005, 04:15 PM #4
Receiving is not the same as sending. Ask the admin of the email domain thats not receiving it if he uses any blacklists or filtering. It might eb bouncing the email because it has not good headers or a spoofed from address or something like that.
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
01-11-2005, 05:35 AM #5
QuietDean, if I send a mail to icasa, I receive it. The problem is that I cannot send that mail, if I use a particular script. I give you the script below:
#begin spurce
$header = "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\nReturn-Path: $email\nFrom: $email <$name>\n";
# I miss some source code that seems not to be important
# I send mail on yahoo or google
if($m1==1){
$subject = ereg_replace(chr(10), "", $subject );
$subject = ereg_replace(chr(13), "", $subject );
if(mail($to,$subject,$message,$header))
$amtrimis=1; # amtrimis means I have sent (mail)
else
$amtrimis=0;
}
// I send mail on iCasa
if($m2==1){
$subject = ereg_replace(chr(10), "", $subject );
$subject = ereg_replace(chr(13), "", $subject );
$to=$emailicasa;
if(mail($to,$subject,$message,$header))
$amtrimis=1;
else
$amtrimis=0;
}
#end source
I want to mention here that If I set $emailicasa = $emailyahoo (the first $to, from the first block - $m1), then I receive 2 mails on that (yahoo) account. As a conclusion, if $m1==$m2==1, the same message is sent to the same yahoo email account.
-
01-11-2005, 06:34 AM #6
Thanks everybody for trying to help me. I found MY error. I used:
$header = "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\nReturn-Path: $email\nFrom: $email <$name>\n";
INSTEAD
$header = "MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\nReturn-Path: $email\nFrom: $name <$email>\n";
-
01-11-2005, 07:52 AM #7
Reading your source, I missed that too. Glad you found it.
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum