PHP mail() function

From: Date: Sat, 04 Nov 2000 16:10:07 +0000
Subject: PHP mail() function
Groups: php.db 
Request: Send a blank email to php-db+get-4214@lists.php.net to get a copy of this message
Hello List Members, I have searched the archives, and the PHP.net web site for the following information, but have been unsuccessful in getting this to work. I have several Linux 6.1 servers with Apache 1.3.12, and I have installed PHP 4.0.3pl and MySQL 3.22.32 on each Server. I have a form that writes to a database on the server, and then sends a 'thank you' email to the person who filled out the form. When the user fills out the form, the data is saved to the database as it should be. However, I cannot get the mail() function to work in php. I am using the mail() function correctly as it is a form I had on a different server and it worked fine there. -- Here is a sample of the mail() function line in my code; <? mail("main@mysite.net", "Thank You", "Thanks $name, for filling out our form\n "); ?> -- Yes, php.ini is configured for short tags. -- I took a look at the php.ini file and it shows the following default settings for SMTP/Sendmail [mail function] SMTP = localhost ;for win32 only sendmail_from = me@localhost.com ;for win32 only ; sendmail_path = ;for unix only, may supply arguments as well (default is sendmail -t) -- In the php.ini file, it appears that the semi-colon ; is used to comment out lines of code. -- I therefore, uncommented the 'sendmail_path' line and added the direct path to sendmail (on my server, the path to send mail is /usr/sbin/sendmail -t) sendmail_path = /usr/sbin/sendmail -t ;for unix only, may supply arguments as well (default is sendmail -t) -- I also attempted to use just 'sendmail -t' sendmail_path = sendmail -t ;for unix only, may supply arguments as well (default is sendmail -t) -- However, neither seemed to work. I then commented out the SMTP line since it says 'for win32 only'. ;SMTP = localhost ;for win32 only -- However, this also did not work. Does anyone have any experience with this? I have spent several hours, yet I am still at square one and my form will not send mail out of PHP4. Thanks, Bill Micke

« previous php.db (#4214) next »