|
#1
|
|||
|
|||
|
I found a script on the web that should do what I want -- but can't seem to get it to work...
Basically I would like to setup an email (i.e. sales@mydomain.com). Whenever an email is sent to the email, I would like a notification sent to my mobile phone -- either forward copy of the email or just give me a simple notification of email waiting. The message should continue and be delivered to the mailbox. Here is script I found including the modifications I made (well sorta), then setup an Email Filter to run the script. The script was put on server and path was set correctly for the filter -- including the PIPE character to run script. ----- #!/usr/bin/perl while (<>) { $subject=$_ if /^Subject/; $from=$_ if ( /From/ and not $from); $date=$_ if ( /^Date:/ and not $date); } @recip=("sales@mydomain.com","5555555@mymobilephon e.com"); foreach (@recip) { open(MAIL,"|/bin/mail -s '$subject' $_"); print MAIL <<EOF; Mail to "sales": $date $from $subject EOF close MAIL; } ---- This script does not appear to do anything. The message is not delivered, the message does not fail and the notification is not sent. Any clues or better direction to go with this? |
![]() |
| Bookmarks |
| Thread Tools | |
|
|