0

After a long time i still cannot catch mails via mailcatcher. Mail is sent, but it is not cought. I'm using xampp, and here are my settings in php.ini:

SMTP = localhost
smtp_port = 1025
sendmail_path = /usr/bin/env catchmail -f some@from.address

and PHP

$message = "Line 1\r\nLine 2\r\nLine 3";


$message = wordwrap($message, 70, "\r\n");


$sent = mail('caffeinated@example.com', 'My Subject', $message,'webmaster@example.com');

if($sent) {
    echo "<h1>Sent...</h1>";
}

UPDATE

I am testing this on Windows OS

Marko Kovačević
  • 421
  • 1
  • 4
  • 17
  • basic debugging: did you check the return value from `mail()`? and note that `smtp` and `smtp_port` are for windows only. they're ignored on linux. – Marc B Jul 24 '15 at 15:56
  • As you see from the code, if mail returns true it is sent and will echo "Sent..." . I am on windows, forgot to mention that. – Marko Kovačević Jul 24 '15 at 16:07
  • if yiou're on windows, then why are you using a unix/linux path? `/usr/bin/env` doesn't exist in windoze... – Marc B Jul 24 '15 at 16:08
  • Well that was dumb of me not looking at that. Just deleted that path and it worked like a charm. Too much copy paste. Thanks a lot ! – Marko Kovačević Jul 24 '15 at 16:21

0 Answers0