php mail on MAMP

后端 未结 6 1940
栀梦
栀梦 2020-12-10 11:23

I need to test some script using PHP\'s mail. I\'d like to be able to finally get this working locally. I am using MAMP. Is there a way to do this without installing any thi

6条回答
  •  借酒劲吻你
    2020-12-10 12:24

    You might want to consider the Swift Mailer library

    http://swiftmailer.org/

    It makes doing email from PHP code much more reliable. You could even point your mailer script to a real SMTP service. This can eliminate a a lot of issues you would run into when moving from local to to production environments.

    Using swift mailer is as simple as using a single include at the top of your PHP script and writing a code block to send a simple message. And it is fully object oriented.

提交回复
热议问题