...
|
...
|
@@ -260,6 +260,7 @@ sub ssmtp_send_mail {
|
260
|
260
|
open(MAIL, "|/usr/lib/sendmail -t");
|
261
|
261
|
print MAIL "Subject: $request->{subject}\n";
|
262
|
262
|
print MAIL "To: $request->{to}\n";
|
|
263
|
+ print MAIL "Reply-To: $request->{email}\n" if ($request->{email} ne '');
|
263
|
264
|
print MAIL "$request->{body}\n";
|
264
|
265
|
close(MAIL);
|
265
|
266
|
log_bot("mail envoyé à $request->{to}");
|
...
|
...
|
@@ -387,6 +388,7 @@ sub from_gtalksms_parse {
|
387
|
388
|
$cfg::gtalksms{"from"} => sub { # Message de +33612345678 :
|
388
|
389
|
$request{phone} = "0" . $1;
|
389
|
390
|
$request{phone_owner} = '';
|
|
391
|
+ $request{email} = '';
|
390
|
392
|
my @results = sql_request("SELECT * FROM section WHERE phone = '$request{phone}'");
|
391
|
393
|
my $number_of_candidates = @results;
|
392
|
394
|
$number_of_candidates == 0 and return;
|
...
|
...
|
@@ -394,6 +396,7 @@ sub from_gtalksms_parse {
|
394
|
396
|
foreach (@results) {
|
395
|
397
|
$request{phone_owner} .= "$_->{firstname} $_->{lastname}";
|
396
|
398
|
--$number_of_candidates > 0 and $request{phone_owner} .= ' ou ';
|
|
399
|
+ $request{email} = $_->{email};
|
397
|
400
|
}
|
398
|
401
|
$request{"phone_owner"} .= ')';
|
399
|
402
|
log_bot("message de $request{phone} $request{phone_owner}");
|