LoginSignup
0
0

More than 5 years have passed since last update.

Mailcatcherを使うphpでsendmail設定(CentOS7)

Last updated at Posted at 2016-09-13

*参考
http://berk.es/2011/05/29/mailcatcher-for-drupal-and-other-php-applications-the-simple-version/

which catchmail
/usr/local/bin/catchmail
php.ini
sendmail_path = "/usr/bin/env /usr/local/bin/catchmail"
systemctl restart httpd.service

メールテスト
*参考
https://www.conetix.com.au/support/article/simple-php-mail-test

<?php 
    ini_set( 'display_errors', 1 );
    error_reporting( E_ALL );
    $from = "emailtest@YOURDOMAIN";
    $to = "YOUREMAILADDRESS";
    $subject = "PHP Mail Test script";
    $message = "This is a test to check the PHP Mail functionality";
    $headers = "From:" . $from;
    mail($to,$subject,$message, $headers);
    echo "Test email sent";
?>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0