@@ -1176,6 +1176,7 @@ function update($event_name, $data) {
11761176 //* Create custom php.ini
11771177 if (trim ($ data ['new ' ]['custom_php_ini ' ]) != '' ) {
11781178 $ has_custom_php_ini = true ;
1179+ $ custom_sendmail_path = false ;
11791180 if (!is_dir ($ custom_php_ini_dir )) $ app ->system ->mkdirpath ($ custom_php_ini_dir );
11801181
11811182 $ php_ini_content = $ this ->get_master_php_ini_content ($ data ['new ' ]);
@@ -1200,6 +1201,13 @@ function update($event_name, $data) {
12001201 }
12011202 }
12021203
1204+ $ custom_sendmail_path = false ;
1205+ $ line = strtok ($ php_ini_content , '\n ' );
1206+ while ($ line !== false ) {
1207+ if (strpos ($ line , 'sendmail_path ' ) === 0 ) $ custom_sendmail_path = true ;
1208+ $ line = strtok ('\n ' );
1209+ }
1210+
12031211 $ app ->system ->file_put_contents ($ custom_php_ini_dir .'/php.ini ' , $ php_ini_content );
12041212 } else {
12051213 $ has_custom_php_ini = false ;
@@ -1244,7 +1252,7 @@ function update($event_name, $data) {
12441252 $ trans = array (
12451253 '{DOCROOT} ' => $ vhost_data ['web_document_root_www ' ],
12461254 '{DOCROOT_CLIENT} ' => $ vhost_data ['web_document_root ' ],
1247- '{DOMAIN} ' => $ vhost_data ['domain ' ]
1255+ '{DOMAIN} ' => $ vhost_data ['domain ' ]
12481256 );
12491257 $ vhost_data ['apache_directives ' ] = strtr ($ vhost_data ['apache_directives ' ], $ trans );
12501258
@@ -1309,6 +1317,8 @@ function update($event_name, $data) {
13091317 $ vhost_data ['seo_redirect_enabled ' ] = 0 ;
13101318 }
13111319
1320+ $ vhost_data ['custom_sendmail_path ' ] = (isset ($ custom_sendmail_path ) && $ custom_sendmail_path ) ? 'y ' : 'n ' ;
1321+
13121322 $ tpl ->setVar ($ vhost_data );
13131323 $ tpl ->setVar ('apache_version ' , $ app ->system ->getapacheversion ());
13141324
@@ -3366,6 +3376,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name,
33663376 }
33673377
33683378 $ custom_session_save_path = false ;
3379+ $ custom_sendmail_path = false ;
33693380 if ($ custom_php_ini_settings != '' ){
33703381 // Make sure we only have Unix linebreaks
33713382 $ custom_php_ini_settings = str_replace ("\r\n" , "\n" , $ custom_php_ini_settings );
@@ -3383,6 +3394,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name,
33833394 if ($ value != '' ){
33843395 $ key = trim ($ key );
33853396 if ($ key == 'session.save_path ' ) $ custom_session_save_path = true ;
3397+ if ($ key == 'sendmail_path ' ) $ custom_sendmail_path = true ;
33863398 switch (strtolower ($ value )) {
33873399 case '0 ' :
33883400 // PHP-FPM might complain about invalid boolean value if you use 0
@@ -3405,6 +3417,7 @@ private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name,
34053417 }
34063418
34073419 $ tpl ->setVar ('custom_session_save_path ' , ($ custom_session_save_path ? 'y ' : 'n ' ));
3420+ $ tpl ->setVar ('custom_sendmail_path ' , ($ custom_sendmail_path ? 'y ' : 'n ' ));
34083421
34093422 $ tpl ->setLoop ('custom_php_ini_settings ' , $ final_php_ini_settings );
34103423
0 commit comments