Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending mass email 1

Status
Not open for further replies.

nil123

Programmer
Oct 17, 2000
2
US
Hi All,

We've a requirement to send mass emails to our members.
This program has to be a shell script or perl script.
Does anybody has any idea or can provide sample code ?

Thanks,
Nil [sig][/sig]
 
Try a korn shell that has a for loop or similar contsruct to take the email addresses one at a time, from a list, and then assigns them to a variable which is input into your mail commmand.

[sig]<p>Ged Jones<br><a href= > </a><br>Top man[/sig]
 
nil123,

The following script will send an individual email (text contained in email.file) to each address listed in the file addresses:

[tt]------------------------------ 8< ---------------------------
#!/bin/ksh

for address in `cat addresses`
do
mailx -s &quot;Mass email&quot; $address < email.file
done
------------------------------ 8< ---------------------------[/tt]

If the address list isn't too large you could also try:

[tt] mailx -s &quot;Mass email&quot; `cat addresses` < email.file[/tt]

Annihilannic.
 
Hi,

which Email system you are using?If you are using sendmail in sun solaris pl do the following
add the below line in your /etc/aliases

xxx:x1,x2,x3
xxx is the alias name and x1,x2 and x3 are your email addresses.

after this update the database by using &quot;make&quot; command

hope this is the right answer.

surendra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top