Sure. Here's what I did: 1. Store the user's account name in $username 2. Store the email in $email 3: # send email using rmail # By calling open on the magic character sequence |-, you fork a copy # of Perl and open a pipe to the copy. The child copy then immediately # exec's another program using the argument list variant of exec(). open(RMAIL,"|-") || exec "/usr/bin/rmail", "$username\@umdnj.edu"; print RMAIL $email,"\n"; close RMAIL; ----- Ryan Golhar Computational Biologist The Informatics Institute at The University of Medicine & Dentistry of NJ Phone: 973-972-5034 Fax: 973-972-7412 Email: golharam@xxxxxxxxx -----Original Message----- From: redhat-list-bounces@xxxxxxxxxx [mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Robert Canary Sent: Friday, June 18, 2004 12:42 PM To: General Red Hat Linux discussion list Subject: Re: send email automatically to new user Our "useradd" is actually a perl script that dose everything we want it to do *and* runs the originally useradd....well it use to. Actually it is all been replaced with the perl script. Nabin Limbu wrote: > Hi, > > Is there any way to send a standard email to a new user automatically > while creating a > user via useradd command. > > Regards > Nabin Limbu > > -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list