This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Free mail script

Old posts that have not been replied to for several years.
Locked
S
SuperHornet

Free mail script

Post by SuperHornet »

I made this script to email the log of the channel I have my eggdrop running in, to some people in my clan.
You can email a few people the log with a Personal subject with the Date on it.
I call it chatmail.pl

Requires Perl

Code: Select all

#!/usr/bin/perl -w
#Created by Erik Mathis: erik@fluidgravity.com 09/02

# Insert Email address here, dont forget to add the "\" before the "@"
@addr=("change\@this.now","email2\@this.now");

# Path to the log you want to email, insert "\" for each "/" and "\" before each"."
$path="\/home\/eggdrop\/eggdrop\/logs\/channelname\.log\.yesterday";

#Your subject text here, this will be appened with the date after it, you may have to use "_" for spaces
$sub="replace_this";



#Date/Time formatting

@Months=('January','February','March','April','May','June','July','August','September','October','November','December')
@WeekDays=('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

($Sec,$Min,$Hour,$Day,$Month,$Year,$Week_Day) = (localtime);

$Year += 1900;
if ($Sec  < 10) { $Sec = "0".$Sec; }
if ($Min  < 10) { $Min = "0".$Min; }
if ($Hour < 10) { $Hour = "0".$Hour; }
if ($Day < 10) { $Day = "0".$Day; }


#Setting Subject Line
$subject="$sub,_$WeekDays[$Week_Day]_$Months[$Month]_$Day,$Year";

#Sending Mail

foreach $email (@addr) {
system "mail $email -s $subject < $path";
}
t
trelarasX

Post by trelarasX »

Some years ago I made a similar shell script. You can find it here:

http://www.coderz.gr/guestREAD.php?CAT=coding&id=3
Locked