Results 1 to 4 of 4

Thread: php error

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2007
    Posts
    39

    php error

    Hi everyone
    I tried to run the program to send Email but the bellow message occure. could anyone please tell me what is wrong and hwo to do the dirctive in php.ini file.

    "sendmail_from" not set in php.ini or custom "From:" header missing in c:\wamp\www\phpexercise\Email.php on line 9

  2. #2
    Addicted Member JRSofty's Avatar
    Join Date
    Jan 2004
    Location
    Somewhere in Germany
    Posts
    149

    Re: php error

    Show some code so we can have a look at it.

    Usually if you want to make a change in the ini you need to call the ini_set function

    For your system you might want to try
    Code:
    ini_set('sendmail_from','[email protected]');

  3. #3

    Thread Starter
    Member
    Join Date
    Apr 2007
    Posts
    39

    Re: php error

    thanks for reply
    this is the cod

    Code:
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <?php 
    mail('[email protected]','Send an Email',"This message \r\nis the result \t\nOf a mail function()call.");
    // chech if the email sent
    $sent= mail('[email protected]','Send an Email',"This message \r\nis the result \t\nOf a mail function()call.");
    
    if ($sent)
    {
     echo "The email was successfully sent.";
     }
     else
     {
     		 echo "the email not successfully sent.";
     }
    		 
     
     ?>
    </body>
    </html>

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: php error

    JRSofty has given you the solution. Also, if you don't want to get spam I would edit your post and remove your email
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width