[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] PHP Mail Function -- Question



Hello List Members,

I have searched the Cobalt Archives, and the PHP.net web site for the
following information, but have been unsuccessful.

I have several RaQ4 servers, 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@xxxxxxxxxx", "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@xxxxxxxxxxxxx        ;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

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