Sending Mail in PHP
  • Hi guys. I've just started learning PHP and am actually trying to send a mail but the problem is that the mail never gets delivered. I firstly tried to use php mail() function. The function returns true, but I don't receive the mail in my inbox. Also tried to use PHPMailer. Function again returns true but no mail received in inbox.

    I configured my php.ini file as follows (after some google search :p)

    [mail function]
    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    sendmail_path = /usr/sbin/sendmail -t

    Does anyone have any idea of what might be the problem?
  • Have a look at your email server log (should be /var/log/mail.log or something similar) and search for any error message. I suppose you've also had a look at your spam folder.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!