#!/usr/bin/perl use warnings; use strict; my $mailprog ="/usr/sbin/sendmail"; my $mailflags ="-t -n -oi"; my $recipient = 'recipient@domain.com'; my $msg_goes_here = "you're message"; open SENDMAIL, "| $mailprog $mailflags" or warn $!; print SENDMAIL "From: user\@domain.com\n"; print SENDMAIL "To: $recipient\n"; print SENDMAIL "Subject: testing 123\n\n"; print SENDMAIL $msg_goes_here; close SENDMAIL;
In reply to Re: sending mail without modules?
by zentara
in thread sending mail without modules?
by Stoney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |