projects
/
app-edwardng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b65d848
)
Add more debugging information
author
Marius Gavrilescu
<marius@ieval.ro>
Mon, 7 Jul 2014 21:13:06 +0000
(
00:13
+0300)
committer
Marius Gavrilescu
<marius@ieval.ro>
Mon, 7 Jul 2014 21:20:56 +0000
(
00:20
+0300)
lib/App/EdwardNG.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/App/EdwardNG.pm
b/lib/App/EdwardNG.pm
index 6f6b3a0adc0abc8cd3b4fcebb93050bc963a0817..e778d6a20b70f6c065ca5a6f47b1c89a44238976 100644
(file)
--- a/
lib/App/EdwardNG.pm
+++ b/
lib/App/EdwardNG.pm
@@
-105,6
+105,7
@@
sub run {
$parser->decode_bodies(0);
$parser->output_to_core(1);
my $in = $parser->parse(\*STDIN);
$parser->decode_bodies(0);
$parser->output_to_core(1);
my $in = $parser->parse(\*STDIN);
+ debug 'Received mail from ', $in->get('From');
my ($tmpl, %params);
try {
my ($tmpl, %params);
try {
@@
-112,6
+113,7
@@
sub run {
} catch {
($tmpl, %params) = (error => message => $_)
};
} catch {
($tmpl, %params) = (error => message => $_)
};
+ debug "Result is $tmpl, GnuPG said:\n", $params{message};
$params{plaintext} = first_part $params{decrypted} if $params{decrypted};
$params{plaintext} = first_part $params{decrypted} if $params{decrypted};
@@
-127,7
+129,7
@@
sub run {
my $email_unencrypted = $email->dup;
my $mg = mg always_trust => 1;
my $encrypt_failed = $mg->mime_signencrypt($email, $in->get('From') =~ /<(.*)>/);
my $email_unencrypted = $email->dup;
my $mg = mg always_trust => 1;
my $encrypt_failed = $mg->mime_signencrypt($email, $in->get('From') =~ /<(.*)>/);
- debug 'Could not encrypt message, sending unencrypted. GnuPG said
'
, stringify $mg->{last_message} if $encrypt_failed;
+ debug 'Could not encrypt message, sending unencrypted. GnuPG said
:', "\n"
, stringify $mg->{last_message} if $encrypt_failed;
sendmail $encrypt_failed ? $email_unencrypted : $email
}
sendmail $encrypt_failed ? $email_unencrypted : $email
}
This page took
0.011288 seconds
and
4
git commands to generate.