Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 10-02-2003, 04:09 PM
dmacke dmacke is offline
Hatchling Croc
 
Join Date: Oct 2003
Posts: 2
Default

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?
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 01:41 PM.

 
Forum SEO by Zoints