sj26 / mailcatcher

Catches mail and serves it through a dream.
http://mailcatcher.me
MIT License
6.5k stars 583 forks source link

mailcatcher - PHP 8.0./8.1 #529

Closed ghost closed 1 year ago

ghost commented 1 year ago

does mailcatcher work with PHP 8.0 or PHP 8.1.. i tried using it and doesn't work.

haydenk commented 1 year ago

https://mailcatcher.me/#php

AFAIK, PHP version is irrelevant. You're either going to configure sendmail to send to mailcatcher or you can send to mailcatcher via SMTP.

ghost commented 1 year ago

so the way i have setup is /etc/php/8.0/mods-available/mailcatcher.ini

sendmail_path=/usr/local/bin/catchmail

this works with php7.4, so do i need to add anything after catchmail if its using PHP 8.0 or higher.

haydenk commented 1 year ago

I'm probably not the best source for this, I just configure my app to use SMTP to mailcatcher for simplicity.

How is your application setup? Are you trying to do this with docker containers, bare metal, or what? Are you using a framework?

ghost commented 1 year ago

i'm just uising a docker containers but the mailcatcher is part of the main docker container, so is just strange to me that php8.0 and 8.1 doesn't work as expected but php 7.4 works fine with that configuration above. I can always figure this out later. i'm jsut puzzled

haydenk commented 1 year ago

Does the executable /usr/local/bin/catchmail exist? What path do you get when you run which catchmail? The PHP instructions show to do /usr/bin/env catchmail which is slightly different than /usr/local/bin/catchmail. The /usr/bin/env will use the appropriate catchmail in the enviroment.

ghost commented 1 year ago

yeah when you install using gem install mailcatcher the catchmail and mailcatcher is all located at /usr/local/bin i could try /usr/bin/env catchmail to see if that makes any difference

sj26 commented 1 year ago

Yeah, it should work. This isn't a mailcatcher issue per se, so I'll close this issue.

ghost commented 1 year ago

either way, i moved away. i can't get it to work on PHP 8.0 and PHP 8.1 so is cool.