diff options
Diffstat (limited to 'localsendsms')
-rwxr-xr-x | localsendsms | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/localsendsms b/localsendsms index 8e33cd2..ad4b749 100755 --- a/localsendsms +++ b/localsendsms @@ -69,7 +69,7 @@ sub transliterate { } sub sendmsg { - my ($phone, $desc, $msg) = @_; + my ($from, $to, $desc, $msg) = @_; unless ($dummy) { my $ua = LWP::UserAgent->new(agent => "localsendsms"); @@ -77,9 +77,9 @@ sub sendmsg { my $url = $sms_url . '?' . $sms_usertag . '=' . uri_escape($sms_user) . '&password=' . uri_escape($sms_pw) - . '&to=' . uri_escape($phone); + . '&to=' . uri_escape($to); $url .= '&api_id=' . uri_escape($sms_api) if ($sms_api); - $url .= '&from=' . uri_escape($sms_phone) if ($sms_phone); + $url .= '&from=' . uri_escape($from) if ($from); $url .= '&smsc=' . uri_escape($sms_smsc) if ($sms_smsc); $url .= '&concatenation=true' if ($sms_concatenation); $url .= '&concat=' . uri_escape($sms_concat) if ($sms_concat); @@ -97,11 +97,11 @@ sub sendmsg { } DEBUG "Done $desc"; } else { - print STDERR "\n --> $phone: $desc\n"; + print STDERR "\n [$from --> $to: $desc]\n\n"; print STDERR $msg . "\n"; } } -&sendmsg($phone, "message", "@ARGV"); +&sendmsg($sms_phone, $phone, "message", "@ARGV"); 1; |