19 users online (0 members and 19 guests)  


  Results 1 to 7 of 7

Related

  1. Problem with mail-script    Forum: PHP Forum
    Replies: 0
  2. Function not defined problem    Forum: Javascript Forum
    Replies: 1
  3. mysql query / function problem....    Forum: Databases
    Replies: 7
  4. PHP Form Mail Problem    Forum: PHP Forum
    Replies: 30
  5. Send Mail Problem    Forum: CGI Perl Forum
    Replies: 11
  1. #1
    ovello's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2004
    Posts
    17

    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.

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    Have ytou checked if your ip is on a spam list and maybe blocked?

    Dave

  3. #3
    ovello's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2004
    Posts
    17
    My ip is not blocked, because I receive mails from the same host/machine, but with another script.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    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 the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    ovello's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2004
    Posts
    17
    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.

  6. #6
    ovello's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2004
    Posts
    17
    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";

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Reading your source, I missed that too. Glad you found it.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread