Here's some Programming How-to's

Perl - how to send email from a windows PC when you're not a unix expert, dont have a sendmail server running (if you did you wouldn't be looking at this!). Pre-requisites are a gmail account - so go get one from!
Here's how to get your PC to send email from a script.
0) create a gmail account if you haven't already got one
1) download Perl from
2) install in default place which is C:\perl - this takes quite a while
3) open a command window Start->Run... cmd then run the following commands
3.1) cd C:\perl\bin
3.2) ppm install Email-Send-SMTP-Gmail

4) create a new directory called c:\perl\test
4.1) create dummy files doc1.txt and doc2.txt in c:\perl\test (example files)

5) create file called in c:\perl\test
5.1) edit and add these lines
  use strict;
  use warnings;
  use Email::Send::SMTP::Gmail;
  use Win32;

  my $email=Email::Send::SMTP::Gmail->new( -smtp  => '',
                                           -login => '',
                                           -pass  => 'your_gmail_password');

  my $messagebody = "This is the message body";

  $email->send(-to          =>'',
               -subject     =>'Test',
               -verbose     =>'1',
               -body        => $messagebody ,
               -attachments => 'C:\perl\test\doc1.txt,c:\perl\test\doc2.txt' );
5.2) obviously change the email addresses and password to your information

6) in the cmd window type
6.1) cd c:\perl\test
6.2) c:\perl\bin\perl

Go ahead and try it.

1) the -verbose flag can be removed but it's useful to start
2) the -attachments flag is sensitive to space characters - make sure that there are no spaces in the comma-separated list of file names
3) learn some Perl to make full use of the features.

Using IMAPClient
You'll have to use the command ppm install Mail-IMAPClient

This script also uses the printfile.exe utility prfile32.exe.
What the script does is check a gmail folder, see if there is message there and if there is then read it, print it out using the prfile32.exe program (check on-line for that) and then deletes the message when printed. After that it goes back to polling the gmail folder for more files to print. It also emails a copy (via a system call to another perl script,, of the printlog file created by the prfile32.exe program.
use strict;
use warnings;
use IO::Socket::SSL;
use Mail::IMAPClient;

while (1)
  my $socket = IO::Socket::SSL->new(
    PeerAddr => '',
    PeerPort => 993,
  or die "socket error";

  my $imapc;
  my $file = "mails";

  $imapc = Mail::IMAPClient->new( Socket  => $socket,
                                  User    => '',
                                  Password  => 'mypassword')
        or die "IMAP Failure: $@";

  if ($imapc->IsAuthenticated()) {
    print "Logged in OK.\n";

  # move to the formum folder

  my $readandprint = 0;
  my $m = $imapc->message_count("messagestoprint");
  if (int($m) != 0)
    # print int($m);
    print "\nNew messages to print\n";
    $readandprint = 1;
    print "No new message\n";
    $readandprint = 0;

  if ($readandprint)
    my @messages = $imapc->search('ALL');

    foreach my $message (@messages)
      my $mbody = $imapc->body_string($message);
      print $mbody;
      print PRINTFILE $mbody;
      $imapc->delete_message($message) or warn "no message deleted";
      system ('c:\printfile\prfile32.exe /q /e /l:c:\perl\mike\printlog prfile.out');

      # wait a bit
      # append the message to the logfile
      print LOGFILE $mbody;
      # email the printlog file
      system ('C:\perl\bin\perl c:\perl\mike\');

      # wait a bit longer
      # continue
  print "Shutting down\n";
  print "Sleeping\n";