Forum Moderators: coopster

Message Too Old, No Replies

Email Problem

         

xeye

6:31 pm on Oct 2, 2005 (gmt 0)



i have a database on my machine served on Localhost, i want to use emails from table and send them email... i connect to internet and when excute the script to send email it doesnt work however when i upload the same file to online server and execute it it sends emails. whats wrong with this, why cant i send emails from my local database thats on my localhost....
any wise words>>
thanks in advance

mcibor

6:58 pm on Oct 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have post server on your localhost? To use mail() in php you need an external server.

Hope this is the problem :)
Best regards
Michal Cibor

xeye

7:00 pm on Oct 2, 2005 (gmt 0)



i have apache installed.. my whole site works very well but i get error on this specific page where i m sending email and specially at the line i used mail function... any idea.. what else i need....

mcibor

7:37 pm on Oct 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need an external mail server. Apache is a www server and won't do any good. You can try out sendmail, or just have a look at the www.php.net/mail manual.

For the Mail functions to be available, PHP must have access to the [u]sendmail[/u] binary on your system during compile time. If you use another mail program, such as qmail or postfix, be sure to use the appropriate sendmail wrappers that come with them. PHP will first look for sendmail in your PATH, and then in the following: /usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib. It's highly recommended to have sendmail available from your PATH. Also, the user that compiled PHP must have permission to access the sendmail binary.

Hope this helps
Michal Cibor

xeye

4:56 am on Oct 3, 2005 (gmt 0)



i read the php manual and its very informative and helpfull too, i will work over it.. thanks for your time..