#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Kharkov, Ukraine
    Posts
    4
    Rep Power
    0
    Hello, I have a problem with mail() function
    I have a site: kit-group.com placed on a hosting company.

    There is a line in httpd.conf:
    php3_sendmail_path /bin/sendmail
    This path EXISTS

    I need to send mail using mail() function.
    In my php3 script there are lines:
    $to="sergey@in.kharkov.ua";
    $subj="testsubj";
    $msg="testmessage";
    mail($to,$subj,$msg);
    This sergey@in.kharkov.ua EXISTS

    But in Netscape I have this message:
    kitgroup... Recipient names must be specified HTTP/1.1 200 OK Date: Mon, 04 Sep 2000 10:09:48
    GMT Server: Apache/1.3.4 (Unix) PHP/3.0.15 X-Powered-By: PHP/3.0.15 Connection: close
    Content-Type: text/html

    And mail() does not send any mail.?????

    Can anybody explain what is wrong, please.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Bucharest, Romania
    Posts
    18
    Rep Power
    0
    You have to add in that line in httpd.conf the parameter -t. If you don't, the "to" and "cc" fields will not be read.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    NYC, USA
    Posts
    17
    Rep Power
    0
    The mail finction consists of a from address which has not been specified in your code.
    Use the function properly. the Format of mail function is
    mail(To, Subject, From ) ;
  6. #4
  7. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,642
    Rep Power
    4492
    there is no from in mail, ntrilok. The format is:

    mail($to,$subject,$message,$headers)

    Headers is optional. You specify who the message is from by using additional headers:

    $headers = "From: John Holmes<john@whatever.com>nReply-to: Support Dept<support@whatever.com>"



    ------------------
    *************************************************************
    * The manual can probably answer 90% of your questions... *
    * *
    * PHP Manual. www.php.net/manual *
    * MySQL Manual: www.mysql.com/documentation/mysql/bychapter *
    *************************************************************

Similar Threads

  1. Uploading Files
    By vivekjain in forum ASP Programming
    Replies: 0
    Last Post: February 16th, 2004, 11:21 PM
  2. Replies: 5
    Last Post: February 11th, 2004, 02:18 AM
  3. Help with script
    By akastarlight in forum Perl Programming
    Replies: 1
    Last Post: February 6th, 2004, 06:55 AM
  4. mail() function dropping characters
    By Webbywarehouse in forum PHP Development
    Replies: 2
    Last Post: January 28th, 2004, 01:42 PM
  5. php for checking mail errors
    By jnccneto in forum PHP Development
    Replies: 0
    Last Post: January 25th, 2004, 08:15 PM

IMN logo majestic logo threadwatch logo seochat tools logo