File fix_warnings.patch of Package perl-Mail-Sender

--- Mail-Sender-0.903/lib/Mail/Sender.pm.old	2017-09-11 09:49:29.851356073 +0200
+++ Mail-Sender-0.903/lib/Mail/Sender.pm	2017-09-11 11:14:42.989616007 +0200
@@ -315,12 +315,14 @@ sub _say_helo {
     $self->{esmtp}{_RCPT_TO}   = '';
     if (exists $self->{'supports'}{DSN} and exists $self->{esmtp}) {
         for (qw(RET ENVID)) {
-            $self->{esmtp}{_MAIL_FROM} .= " $_=$self->{esmtp}{$_}"
-                if $self->{esmtp}{$_} ne '';
+            if (defined($self->{esmtp}{$_}) and $self->{esmtp}{$_} ne '') {
+                $self->{esmtp}{_MAIL_FROM} .= " $_=$self->{esmtp}{$_}";
+            }
         }
         for (qw(NOTIFY ORCPT)) {
-            $self->{esmtp}{_RCPT_TO} .= " $_=$self->{esmtp}{$_}"
-                if $self->{esmtp}{$_} ne '';
+            if (defined($self->{esmtp}{$_}) and $self->{esmtp}{$_} ne '') {
+                $self->{esmtp}{_RCPT_TO} .= " $_=$self->{esmtp}{$_}";
+            }
         }
     }
     return;
@@ -925,8 +927,9 @@ sub _prepare_ESMTP {
     $self->{esmtp}
         = {%{$self->{esmtp}}};    # make a copy of the hash. Just in case
 
-    $self->{esmtp}{ORCPT} = 'rfc822;' . $self->{esmtp}{ORCPT}
-        if $self->{esmtp}{ORCPT} ne '' and $self->{esmtp}{ORCPT} !~ /;/;
+    if (defined($self->{esmtp}{ORCPT}) and $self->{esmtp}{ORCPT} ne '' and $self->{esmtp}{ORCPT} !~ /;/) {
+        $self->{esmtp}{ORCPT} = 'rfc822;' . $self->{esmtp}{ORCPT};
+    }
     for (qw(ENVID ORCPT)) {
         $self->{esmtp}{$_} = enc_xtext($self->{esmtp}{$_});
     }
openSUSE Build Service is sponsored by