and add a \n in a good place
[pgp-tools.git] / caff / caff
index 791021aedcccb5ceeb221c8297f3f390aed56711..7ab933112f0bdf9b0c29209280cf15aca30c68d3 100755 (executable)
--- a/caff/caff
+++ b/caff/caff
@@ -779,8 +779,11 @@ sub send_mail($$$@) {
                            (defined $CONFIG{'also-encrypt-to'})) {
                                my $reason = $1;
                                my $keyid = $2;
-                               if (grep { %_ eq $keyid } @{$CONFIG{'also-encrypt-to'}}) {
-                                       warn("Could not encrypt to $keyid, specified in CONFIG{'also-encrypt-to'}.  Try to update the key using gpg --homedir=\$HOME/caff/gnupghome --import <exported key>.");
+                               if (grep { $_ eq $keyid } @{$CONFIG{'also-encrypt-to'}}) {
+                                       warn("Could not encrypt to $keyid, specified in CONFIG{'also-encrypt-to'}.\n".
+                                            "Try to update the key using gpg --homedir=$GNUPGHOME --import <exported key>\n".
+                                            "or try the following if you are slightly more daring:\n".
+                                            " gpg --export $keyid | gpg --homedir=$GNUPGHOME --import\n");
                                        return;
                                };
                        };