0

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?

jnersn
  • 384
  • 1
  • 3
  • 14
James
  • 5,942
  • 15
  • 48
  • 72
  • This may be a better question over on Server Fault? – Marcus Griep Jul 11 '09 at 02:30
  • Well now I have corrected the path, but it isn't sending. Unsure whether it's a PHP or msmtp thing. I will ask over at Server Fault if you think they'll be better suited. – James Jul 11 '09 at 03:00

2 Answers2

0

Typing

which msmtp

from the command line should return the path to msmtp.

Otterfan
  • 751
  • 4
  • 7
  • Thanks, emails still aren't coming through. How am I able to check what might be going wrong? – James Jul 11 '09 at 02:03
0

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
  • 1,325
  • 14
  • 24