use Mail::Sendmail; # Create the message hash my %mail = ( To => 'You ', # To address.. From => 'Me ', # From address.. Message => 'Hello, world!', # The message body.. Smtp => 'your.mail.server' # erase this if you want to use "localhost" (default) ); # Send the message unless (sendmail(%mail)) { # Error! } # All is well.