2

I am working on my own website.

I am planning to have a mail function to send notification to the users who want to join my website.

The problem is the mail function of PHP does not work for me.

Can anyone help me with this?

1
  • Can you elaborate on what errors it is giving or what you've tried so far? Mar 4, 2009 at 20:31

3 Answers 3

4

if you are on a windows platform, you could try:

fake sendmail for windows

I am assuming you are not running your own mail server and do not wish to install one. All you want to do is send emails to or via (relay) your ISP mail server using PHP, either to test your own scripts or to test third party ones.

With Fake Sendmail in place we need to edit the php.ini file so PHP’s mail function can use it:

Open the file php.ini located in folder C:\php search for this section [mail function] (starts around line 612)

sendmail_path = "/usr/local/sendmail/sendmail.exe -t"

for more info go to: http://wiki.uniformserver.com/index.php/Installing_Fake_Sendmail_for_Windows

2

Modify the php.ini for your application to point to an smtp server in the [mail function] section. The options you need to set are described here: http://www.w3schools.com/PHP/php_ref_mail.asp

0

In this case, I'd say that if the documentation for mail doesn't answer your question, it's a configuration problem with whatever you are using as a server.

If this is your desktop, you may also be having problems with your mail looking like spam.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.