will_do
asked on
Setting a allusers email
Hi There
I need to setup a email that will email every user on the system
has anyone got any ideas how to do it
Phil
I need to setup a email that will email every user on the system
has anyone got any ideas how to do it
Phil
ASKER
Thankyou
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thankyou
but how do i set it up
where do i put the script?
do i add a allusers account?
sorry i'm very new to linux
but how do i set it up
where do i put the script?
do i add a allusers account?
sorry i'm very new to linux
ASKER
thankyou
but how do i set it up
where do i put the script?
do i add a allusers account?
sorry i'm very new to linux
but how do i set it up
where do i put the script?
do i add a allusers account?
sorry i'm very new to linux
Okay, open a new file named "mailer" and paste the perl code into it. Close the file and make it executable with "chmod +x mailer". If you only want to use it from one account, just leave "mailer" in that user's home dir, otherwise you could copy the file to someplace that multiple users can get to, like /usr/local/bin or /usr/bin.
To use it, create a file containing the message and invoke the utility like "mailer sender "The Subject" message-file".
To use it, create a file containing the message and invoke the utility like "mailer sender "The Subject" message-file".
ASKER
Thanks jlevie once again
but i just get mailer command not found when i type in mailer sender
but i just get mailer command not found when i type in mailer sender
If you are in the directory that you've created the mailer script file in, it might be that the current directory isn't in your path. Try "./mailer sender "A subject" msg-file". If that fails, make sure that it's executable:
levie> ls -l mailer
-rwxrwxr-x 1 levie staff 2211 Feb 29 17:09 mailer*
The "x"s above indicate executable mode for user, group, and other.
levie> ls -l mailer
-rwxrwxr-x 1 levie staff 2211 Feb 29 17:09 mailer*
The "x"s above indicate executable mode for user, group, and other.
ASKER
ok i think i have got it
but this comes up
[root@phil allusers]# mailer sender "The Subject" message"
>
>
>
and the > just keep coming until you use ctrl c
but this comes up
[root@phil allusers]# mailer sender "The Subject" message"
>
>
>
and the > just keep coming until you use ctrl c
There's an extra " at the end of the line after message. There have to "s around the second argument as a subject will usually contain spaces.
ASKER
cool thankyou i got it
I can't get to the perl code from where I am now, but I'll get it and paste it into a comment later this evening.