RE: send email automatically to new user
From: Ryan Golhar (golharam_at_umdnj.edu)
Date: 06/18/04
- Previous message: Robert Canary: "Re: send email automatically to new user"
- In reply to: Robert Canary: "Re: send email automatically to new user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 18 Jun 2004 12:51:17 -0400 To: "'General Red Hat Linux discussion list'" <redhat-list@redhat.com>
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@umdnj.edu
-----Original Message-----
From: redhat-list-bounces@redhat.com
[mailto:redhat-list-bounces@redhat.com] 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@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list -- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
- Previous message: Robert Canary: "Re: send email automatically to new user"
- In reply to: Robert Canary: "Re: send email automatically to new user"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|