문제

I have phpmailer working on my system already. I am updating some code that uses it to send out emails, I just need to test to make sure that the update sends the correct information, but not send out actual emails as it sends them out to hundreds of people.

Is there a quick way to redirect phpmailer to a file, or better yet if phpmailer uses sendmail, to have that command redirect to a file? This is a test server, so it would be best if all mail functionality was redirected to a file or something.

도움이 되었습니까?

해결책

You can set sendmail_path in php ini to whatever you want. For example, it can be tee -a mail.log so that everything gets logged to a file.

다른 팁

You can Use MailHog

https://github.com/mailhog/MailHog

Just Setup MailHog In Your Application and just set configuration in your PHPMailer Like Host => 'mail' Port => 1025

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top