| 
      
            Lines 1-4
          
      
      
        Link Here
      
     | 
  
          
            
              | 1 | 
              package C4::Letters;  | 
              1 | 
              kfpackage C4::Letters;  | 
            
        
          | 2 | 
           | 
          2 | 
           | 
        
        
          | 3 | 
          # Copyright 2000-2002 Katipo Communications  | 
          3 | 
          # Copyright 2000-2002 Katipo Communications  | 
        
        
          | 4 | 
          #  | 
          4 | 
          #  | 
        
  
    | 
      
            Lines 672-677
          sub EnqueueLetter ($) {
      
      
        Link Here
      
     | 
  
        
          | 672 | 
              return unless exists $params->{'borrowernumber'}; | 
          672 | 
              return unless exists $params->{'borrowernumber'}; | 
        
        
          | 673 | 
              return unless exists $params->{'message_transport_type'}; | 
          673 | 
              return unless exists $params->{'message_transport_type'}; | 
        
        
          | 674 | 
           | 
          674 | 
           | 
        
            
               | 
               | 
              675 | 
                  my $content = $params->{letter}->{content}; | 
            
            
              | 676 | 
                  $content =~ s/\s+//g if(defined $content);  | 
            
            
              | 677 | 
                  if ( not defined $content or $content eq '' ) { | 
            
            
              | 678 | 
                      warn "Trying to add an empty message to the message queue" if $debug;  | 
            
            
              | 679 | 
                      return;  | 
            
            
              | 680 | 
                  }  | 
            
            
              | 681 | 
               | 
            
        
          | 675 | 
              # If we have any attachments we should encode then into the body.  | 
          682 | 
              # If we have any attachments we should encode then into the body.  | 
        
        
          | 676 | 
              if ( $params->{'attachments'} ) { | 
          683 | 
              if ( $params->{'attachments'} ) { | 
        
        
          | 677 | 
                  $params->{'letter'} = _add_attachments( | 
          684 | 
                  $params->{'letter'} = _add_attachments( | 
        
            
              | 678 | 
              -   | 
               | 
               |