CoderZone.org

Category: >> Perl Code >> Sending Email With Perl Bookmark and Share

<< lastnext >>

Snippet Name: Sending Email With Perl

Description: This snippet demonstrates one of the typical ways to send email from a Perl script.

Also see:
» Check For A Valid Email Address

Comment: (none)

Author: CoderZone
Language: PERL
Highlight Mode: PERL
Last Modified: December 03rd, 2010

my $SendmailLocation = '/sbin/sendmail -t';
my $ToAddress = 'name@domain.com';
open MAIL,"|$SendmailLocation";
print MAIL <<EMAIL;
To: $ToAddress
Subject: Testing
 
Testing email function...
EMAIL
close MAIL;
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 5