added autocomplete="off"
[koha.git] / C4 / Letters.pm
index 5cde41d..28c6984 100644 (file)
@@ -393,16 +393,16 @@ sub SendAlerts {
                 'Content-Type' => 'text/plain; charset="utf8"',
             );
             sendmail(%mail) or carp $Mail::Sendmail::error;
-            warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}";
+            warn "sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}" if $debug;
             if ( C4::Context->preference("LetterLog") ) {
                 logaction( "ACQUISITION", "Send Acquisition claim letter", "", "order list : " . join( ",", @$externalid ) . "\n$innerletter->{title}\n$innerletter->{content}" ) if $type eq 'claimacquisition';
                 logaction( "ACQUISITION", "CLAIM ISSUE", undef, "To=" . $mail{To} . " Title=" . $innerletter->{title} . " Content=" . $innerletter->{content} ) if $type eq 'claimissues';
             }
         } else {
-            die "This bookseller has no email\n";
+            return {error => "no_email" };
         }
 
-        warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}";
+        warn "sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}" if $debug;
     }
 
     # send an "account details" notice to a newly created user