Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Windows Mailer

Posted by TedH (TedH), 4 November 2005
Hi guys, on Unix/Apache web servers we have SendMail. Fair enuf, easy to set up a mail notification.

However Windows servers use something different and I haven't got a clue as to what it is or how to find out info on it ( I know nothing about Windows servers).

So I've come here
My continuing blog project has reached the point of mail notification of a comments posting. I've got the Unix Sendmail one working...

open (SENDMAIL, "|/usr/lib/sendmail -t") or die "cannot open sendmail: $!";
print SENDMAIL "To: me\\n";   # Email to receiver
print SENDMAIL "From: you\\n";        # Your email (backslash required)
print SENDMAIL "Reply to: you\\n";    # Your email (backslash required)
print SENDMAIL "Subject: Comment Added to blog\n\n";   # Subject title
print SENDMAIL "A new comment has been added to the entry, ( $title ) on the blog"; # message

...and need to offer an option for the main Windows alternative.

What do I do? Or where can I find out?

Hope you can help - cheers - Ted

Posted by Custard (Custard), 4 November 2005

Have you checked out CPAN?

I use Mail::Sendmail in some of my programs. Despite it's name, it is platform independant according to its pod.

You may have to edit its and change the name of the smtp mail server to one of yours if it's not on 'localhost'.

       require Test::More;
       Test::More->import( tests => 4 );
       my $mailer = new BT::SAN::Mailer( '' );
       ok( defined $mailer,                    'instantiated...' );
       ok( $mailer->subject( 'Testing 123' ),  'added subject...');
       ok( $mailer->body( 'Is this microphone working?...' ),  'added body...');
       ok( $mailer->send(),                    'send()...' );

There are other Mail:: modules on CPAN too.



Posted by TedH (TedH), 4 November 2005
Hi Custard, the blog is going to end up as a give away on a freebie scripts site, so anything I have as an option will have to be some sort of generic Windows thingy. Otherwise I can just have a bit in the instructions saying that they'll have to sort out the mailer themselves and replace the Nix Sendmail bit of code.

I just wasn't sure, as most Unix Apache servers use Sendmail and I have this feeling that there could be just about anything on Windows ones  

- Ted

Posted by TedH (TedH), 5 November 2005
Custard, thanks, I looked around (CPAN etc) and there seems to be quite a variety of mail packages used on Windows servers. So, I've set up the script with options (0=none, 1=Unix/Sendmail, 2=Windows) and will do a blurb in the instructions about the user sorting it out with their sys admin as I would not know which one anybody's using.

I found several different mail systems (some very expensive) and references to more and figured, 'that's enough, I'm gonna be here all week'.

cheers - Ted

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2023: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho