Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End sending e-mail via php

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #34743

    Hi,

    I am sending email using php when any user added comments to my comments but i did not received any mail .
    i used mail() function for sending mail.

    could any one plz tell me how to solve this issue and is any alternate methods are there for sending using PHP.

    regards,
    Raghavendrachari

    #88332
    Bob
    Member

    Have you tried using the mail function separately? What I mean is, have you tried letting it send you the email after filling in a form and clicking the submit button? Maybe there is something wrong and your code won’t recognize it correctly when someone added a comment. Even better maybe would be to see the code.

    #88954

    This is the code which i am using

    
    $to      = '[email protected]';
    $subject = 'the subject';
    $message = 'hello';
    $headers = 'From: [email protected]' . "rn" .
    'Reply-To: [email protected]' . "rn" .
    'X-Mailer: PHP/';
    echo "

    ";
    if (mail($to, $subject, $message, $headers)) {
    echo("

    Message successfully sent!

    ");
    } else {

    echo("

    Message delivery failed...

    ");
    }

    ?>
    #89007

    No .. it displays ‘Message delivery failed…!!!’

    #89043

    Hi,

    Thank U

    I tried what u said but same problem facing ; after header parameter removed same ‘Failure error message’.

    Is there any alternate method or how can i checkl php error logs,where it was stored in logs.

    regards,
    Raghavendrachari

    #89048
    SgtLegend
    Member

    Are you testing this on a local or live server?

    #89116

    on local server having internet access.. !!

    i tried from other system via internet .. also same issue is coming..!!

    is there any possibility of source code which will execute properly ?? plz send

    thank U

    #89161
    TheDoc
    Member

    Testing mail functions on a local server requires further set up. Try testing it on a live server.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.