]> Frank Brehm's Git Trees - scripts/solaris.git/commitdiff
Bugfixing
authorFrank Brehm <frank@brehm-online.com>
Mon, 16 Jan 2006 10:25:53 +0000 (10:25 +0000)
committerFrank Brehm <frank@brehm-online.com>
Mon, 16 Jan 2006 10:25:53 +0000 (10:25 +0000)
SMS.pm
mail2sms.pl

diff --git a/SMS.pm b/SMS.pm
index 4737782879f0a54dc9e81cd14f4c18fe820be569..97dc138385c8bb3a63b4c9b48c52b141c05cc0e0 100644 (file)
--- a/SMS.pm
+++ b/SMS.pm
@@ -267,6 +267,7 @@ sub parse_from_gammu {
     
   }
 
+  $body = '' unless defined $body;
   $body =~ s/\s+$//;
   $self->body( $body );
 
index 41c0ab77091ef4277700e940065222d170272b51..d7aeba81ff21d982f7f6cbe41e7ef30da8603d16 100755 (executable)
@@ -17,6 +17,7 @@ $| = 1;
 
 my $sendmail = "/usr/lib/sendmail";
 my $rcpt     = 'brehm@strato.de';
+my $from     = 'SMS Daemon <sms@smc.technik.berlin.strato.de>';
 my $dir      = "/var/spool/sms/outbox/";
 #my $dir      = "/tmp/";
 my $filepat  = $dir . "mail2sms_" . time() . "-" . $$ . '_%d.txt';
@@ -64,6 +65,7 @@ $text = substr( $text, 0, $maxlen );
 $subject .= "'" . join( "', '", @Rcpts ) . "'";
 
 open  MAIL, "| $sendmail $rcpt" or die "Konnte $sendmail nicht starten.\n";
+print MAIL "From: " . $from . "\n";
 print MAIL "To: " . $rcpt . "\n";
 print MAIL "Subject: $subject\n\n";