#!/usr/bin/perl use warnings; use strict; use Net::SMTP_auth; use Net::SMTP; my $smtp = Net::SMTP_auth->new('smtp.gmail.com', Debug => 1); $smtp->auth('LOGIN', 'b.siebens@gmail.com', '********'); $smtp->mail('watcher@landbouwkring.be'); $smtp->to('b.siebens@gmail.com'); $smtp->data(); $smtp->datasend("To: b.siebens\@gmail.com"); $smtp->datasend("From: watcher\@landbouwkring.be"); $smtp->datasend("\n"); $smtp->datasend("A simple test message.\n"); $smtp->dataend(); $smtp->quit();