my $mail_prog = '/usr/sbin/sendmail'; # now assuning $new_user_email is the new user's email # and our text is in a file /welcome/message.txt # all we need to do is trigger this code concurrent with # the creation of a new user (when we get the email address) if ($new_user) { open TEXT, "; close TEXT; open MAIL, "|$mail_prog -t" or die "Oops $!\n";; print MAIL "To: $new_user_email\n"; print MAIL "Reply-to: \n"; print MAIL "From: Pelmonks\n"; print MAIL "Subject: Welcome to Pelmonks\n"; print MAIL "$welcome\n"; close MAIL; }