ajout de la possibilité de mettre l'intro par un fichie...
...r html
... | ... |
@@ -120,7 +120,21 @@ die "session error: $error" unless ($mail!=-1); |
120 | 120 |
|
121 | 121 |
foreach my $dest (keys(%{$cfg::config{notification}->{to}})) { |
122 | 122 |
|
123 |
- my $data = $cfg::config{notification}->{to}->{$dest}->{intro}; |
|
123 |
+ my $data = ''; |
|
124 |
+ |
|
125 |
+ if (substr($cfg::config{notification}->{to}->{$dest}->{intro}, 0, 1) eq "/" |
|
126 |
+ and -r $cfg::config{notification}->{to}->{$dest}->{intro}) { |
|
127 |
+ open INTRO, $cfg::config{notification}->{to}->{$dest}->{intro}; |
|
128 |
+ while (<INTRO>) { |
|
129 |
+ if (/^<body /../^<\/body>/) { |
|
130 |
+ $data .= $_ unless /^<body / or /^<\/body>/; |
|
131 |
+ } |
|
132 |
+ } |
|
133 |
+ close INTRO; |
|
134 |
+ } |
|
135 |
+ else { |
|
136 |
+ $data .= $cfg::config{notification}->{to}->{$dest}->{intro}; |
|
137 |
+ } |
|
124 | 138 |
|
125 | 139 |
foreach my $category (keys(%{$polls})) { |
126 | 140 |
next unless (keys%{$polls->{$category}}); |