problem with sending emails

Discussion in 'PHP' started by saqqa, Jul 11, 2006.

  1. #1
    hi every one :)
    this my first topic here..... thanks for all on advance

    well, im brand new with PHP

    im using apache server at my pc with php5
    and i have a web hosting thats supports PHP and i test my website life over the internet.

    my problem is i send mail thats never arrive to the distination however, no error msg appears
    ,i used many code ,,,, all the same sad ending :(

    here is sample ...... can any body tell me what 2 do plz!



    Code: [Download]

    <?PHP
    $to = "saqqa505@yahoo.com";

    $re = "Feedbackfromcontactpage";

    $msg = $comments;

    mail($to,$re,$msg);

    ?>




    thank you all and im happy to be here today friends.
     
    saqqa, Jul 11, 2006 IP
  2. danielbruzual

    danielbruzual Active Member

    Messages:
    906
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    70
    #2
    the code is correct, the problem must be in your php.ini file. I used to have the same problem in my local apache-php setup and with some free php hosts. Then I bought a hosting account and my code started working perfectly.
     
    danielbruzual, Jul 11, 2006 IP
  3. ahref

    ahref Well-Known Member

    Messages:
    1,123
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    170
    #3
    You can use phpmailer instead of mail function
     
    ahref, Jul 11, 2006 IP
  4. Veselin Stoilov

    Veselin Stoilov Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    did you try to include Header tag for the outgoing message?
     
    Veselin Stoilov, Jul 14, 2006 IP
  5. saqqa

    saqqa Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thank u guys,, sorry 4 late ,, i was i way for several days.............

    i think i will consider phpmailer:)
     
    saqqa, Jul 16, 2006 IP
  6. kddesai98

    kddesai98 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi everyone,

    I am also facing similar issue with hotmail receipts. On my site, there is a way to send out emails to people using 2 different accounts (e..g abc@site.com and xyz@site.com)

    emails sent out using abc@site.com to hotmail account is received fine (still in junk mail folder, though), while emails sent out using xyz@site.com to a hotmail account were never received (not even in junk mail).

    The application is written in PHP and both mailing functionality using same code.

    Any pointers would be appreciated.

    Thanks,
    KD
     
    kddesai98, Aug 1, 2006 IP