tags:

views:

86

answers:

2

I just switched to using Msmpt, but I am unable to send using the mail() function. I can send via SSH command line perfectly but var_dump shows that mail returns a false value.

sendmail_path = /usr/bin/msmtp -t -i

Is the path, but manually browsing, I am unable to locate "msmtp". Any ideas how to find where it is located so I am able to correct the sendmail path?

A: 

Typing

which msmtp

from the command line should return the path to msmtp.

Otterfan
Thanks, emails still aren't coming through. How am I able to check what might be going wrong?
James
A: 

I dont have any experience with msmtp but tried many smtp server types..

At first, does your smtp require authentication (for your host. maybe its' localhost, but it's up to configuration.) if yes. you may need to use a php smtp library with authentication. there is one in pear http://email.about.com/od/emailprogrammingtips/qt/et073006.htm Check the link use the sample code. Trying to send a mail via sockets (! notice that not mail() function) will tell you much more diagnostic information. if you dont have pear installed check phpmailer library in sourceforge.net. i use phpmailer which is much easier to use than pear.

risyasin