Commit 874634ed authored by Romain Therville's avatar Romain Therville 🐭
Browse files

Revert "Merge branch 'issue#195' into 'master'"

This reverts merge request !115
parent 7b5946c2
......@@ -109,15 +109,6 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
static function send_purge_demand_mail($project_ids, $extension_allowed = 1) {
$project_name="";
$headers[] = 'From: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_from"];
//$headers[] = 'From: gerald.salin@inra.fr';
//$headers[] = 'Errors-To: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_copy"];
$headers[] = 'Errors-To: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_from"];
$headers[] = 'X-Mailer: PHP/' . phpversion();
$headers[] = 'MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=utf-8';
$headers[] = 'Cc: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_copy"];
foreach(explode(",", $project_ids) as $project_id){
#retrieve project data
......@@ -257,15 +248,6 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
static function resend_purge_demand_mail ($demands_id) {
$res_demands = tx_nG6_db::get_purge_demand_from_id($demands_id);
$headers[] = 'From: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_from"];
//$headers[] = 'Errors-To: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_copy"];
$headers[] = 'Errors-To: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_from"];
$headers[] = 'X-Mailer: PHP/' . phpversion();
$headers[] = 'MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=utf-8';
$headers[] = 'Cc: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_copy"];
foreach($res_demands as $res_demand){
$res_project = tx_nG6_db::select_project($res_demand["project_id"]);
$total_project_size = tx_nG6_db::get_project_size($res_demand["project_id"], true) ;
......@@ -298,6 +280,14 @@ class tx_nG6_pi6 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["min_extension_size"], "This email was send to ". join(', ',$res_demand["emails"]).". ", join(', ', $run_info), join(', ', $analyses_info), $extension_allowed);
$subject = '[nG6 purge / reminder] No '.$res_demand["demand_id"].' - Project '.$res_project["name"];
$headers[] = 'From: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_from"];
//$headers[] = 'Errors-To: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_copy"];
$headers[] = 'Errors-To: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_from"];
$headers[] = 'X-Mailer: PHP/' . phpversion();
$headers[] = 'MIME-Version: 1.0';
$headers[] = 'Content-type: text/html; charset=utf-8';
$headers[] = 'Cc: '.$GLOBALS['TSFE']->tmpl->setup["plugin."]["tx_nG6_pi6."]["email_copy"];
$to= join(",",$res_demand["emails"]);
mail($to, $subject, $mail, implode("\r\n", $headers));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment