Skip to content
Permalink
Browse files

Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop

  • Loading branch information
eldy committed Dec 2, 2019
2 parents 310e65b + 66571df commit c6926504308e4baebeb73ebb5772941c1b39b727
Showing with 21 additions and 2 deletions.
  1. +1 −1 htdocs/langs/en_US/admin.lang
  2. +20 −1 scripts/emailings/mailing-send.php
@@ -1138,7 +1138,7 @@ TriggerAlwaysActive=Triggers in this file are always active, whatever are the ac
TriggerActiveAsModuleActive=Triggers in this file are active as module <b>%s</b> is enabled.
GeneratedPasswordDesc=Choose the method to be used for auto-generated passwords.
DictionaryDesc=Insert all reference data. You can add your values to the default.
ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting. For a full list of the parameters available <a href="https://wiki.dolibarr.org/index.php/Setup_Other#List_of_known_hidden_options" title="External Site - opens in a new window" target="_blank">see here</a>.
ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting only.
MiscellaneousDesc=All other security related parameters are defined here.
LimitsSetup=Limits/Precision setup
LimitsDesc=You can define limits, precisions and optimizations used by Dolibarr here
@@ -4,6 +4,7 @@
* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -90,6 +91,8 @@
$emailing = new Mailing($db);
$emailing->fetch($obj->rowid);
$upload_dir = $conf->mailing->dir_output . "/" . get_exdir($emailing->id, 2, 0, 1, $emailing, 'mailing');
$id = $emailing->id;
$subject = $emailing->sujet;
$message = $emailing->body;
@@ -228,9 +231,25 @@
$substitutionisok = true;
$arr_file = array();
$arr_mime = array();
$arr_name = array();
$arr_css = array();
$listofpaths=dol_dir_list($upload_dir, 'all', 0, '', '', 'name', SORT_ASC, 0);
if (count($listofpaths))
{
foreach($listofpaths as $key => $val)
{
$arr_file[]=$listofpaths[$key]['fullname'];
$arr_mime[]=dol_mimetype($listofpaths[$key]['name']);
$arr_name[]=$listofpaths[$key]['name'];
}
}
// Fabrication du mail
$trackid = 'emailing-' . $obj->fk_mailing . '-' . $obj->rowid;
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, array(), array(), array(), '', '', 0, $msgishtml, $errorsto, '', $trackid, '', 'emailing');
$mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, '', 'emailing');
if ($mail->error) {
$res = 0;

0 comments on commit c692650

Please sign in to comment.
You can’t perform that action at this time.