Gossamer Forum
Home : Products : Links 2.0 : Customization :

Site of Day Mod -- Modification

Quote Reply
Site of Day Mod -- Modification
Ok, I finnaly got the cron aspect of the site of the day script working.. however I would like to make a modification to it.. when it runs I would it to use sendmail and send the person a E-mail letting them know their site is being listed as site of day.. any ideas how to do this.. basicly I need it to go in and read the contact e-mail and contact name.. store those in a varible and then send a E-mail out.. like

Dear $CONTACTNAME,

Your Resource $RESOURCENAME is being listed as the Resource of the Day!


Something to that effect?? anybody know how to do it?

------------------
Extreme Network Hosting
http://www.enhost.com
Quote Reply
Re: Site of Day Mod -- Modification In reply to
Add to sotd.pl...
Code:
$mail_program="/usr/sbin/sendmail -t";
and near the end of sub main...
Code:
open (MAIL, "|$mail_program")
print MAIL "To: $rec{'Contact Email'}\n";
print MAIL "From: youraddress@domain.com\n";
print MAIL "Subject: Your Site has been honored...\n";
print MAIL "
$rec{'Contact Name'},

Your Resource $rec{Title} is being listed as the Resource of the Day!

Regards,

You
";
close(MAIL);
Haven't tested this, but it should work (at least on a Unix system).
Quote Reply
Re: Site of Day Mod -- Modification In reply to
Thank you =)

I knew it was going to be something simple.. but just didn't know how to do it =)


Thanks a bunch

------------------
Extreme Network Hosting
http://www.enhost.com