Sendmail not showing recipients


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Sendmail not showing recipients
# 1  
Old 02-17-2012
Sendmail not showing recipients

I've figured out to do a mail merge with /usr/lib/sendmail which is extremely helpful as it is lightning fast compared to an Outlook mail merge which pretty much locks up my machine while it struggles to push out the emails. I figured out how to send html emails, with dynamic variables, and how our company translates id's to addresses which is 95% done. The last obstacle I'm facing is that the emails do not show to whom the email was sent.

When I use Outlook mail merge, which does not have an option for Cc'ing multiple users, I have to put this pathetic note at the top saying "This email was also sent to <person1>, <person2>, <person3> (Outlook mail merge does not allow cc)". So I'm trying to use sendmail but it's now showing the recipients in the received mail so it doesn't achieve the desired result. This is how I have it set up:
Code:
while read line
do
REQUEST_NUMBER=`echo $line | cut -d" " -f8` USER_LOGIN=`echo $line | cut -d" " -f2` END_USER=`echo $line | cut -d" " -f3` REQUESTOR=`echo $line | cut -d" " -f4` SERVER_OWNER=`echo $line | cut -d" " -f5`
(
cat html_greeting echo $END_USER cat html_body echo $REQUESTOR cat html_server_owner echo $SERVER_OWNER cat html_closing
) | /usr/lib/sendmail -f NO-REPLY@domain $SERVER_OWNER,$REQUESTOR,$END_USER done < txt

Where txt is a sheet of data w/ all the id's and stuff on each line. I tried putting the recipients without commas, inside quotes, with commas and inside quotes...several different combinations. The emails are sent and received but the three people will not see that they have all been send the email so there could be some confusion as to who is in the loop and who isn't. Is there a reason those three addresses would not show on the receiving email?
# 2  
Old 02-17-2012
It looks like you can put the address into the email yourself and let sendmail pull them back out:

Man Page for sendmail (OpenSolaris Section 1m) - The UNIX and Linux Forums

-t Reads message for recipients. To:,Cc:, and Bcc: lines are scanned for people to send to. The Bcc: line is deleted before transmis- sion. Any addresses in the argument list is suppressed. The NoRe- cipientAction Processing Option can be used to change the behavior when no legal recipients are included in the message. sendmail is a very primitive mail client, so this is nice, nicer than feeding esmtp to tcp port 25 yourself.
This User Gave Thanks to DGPickett For This Post:
# 3  
Old 02-17-2012
When you post problems, please post what Operating System and version you are using and what Shell you prefer.

If you have problems with a script like this, please post the command line used to invoke the script (blotting anything confidential with X's). Mail problems are difficult enough without so many unknown variables.


Quite honestly unless the variable "$line" contains some valid "sendmail" commands the whole script is guessware. As for what is in the file "txt" we remain uninformed.

I'm trying to be polite but please go away if you are trying to send spam. If you are a valid learner, please post a testable example without so many undefined variables or files with unknown contents.


@DGPickett
sendmail is a very primitive mail client. You are joking?

Last edited by methyl; 02-17-2012 at 08:02 PM.. Reason: spellin, addenda, punctuation, layout
# 4  
Old 02-21-2012
Pickett - thank you so much! I now have a couple of echo lines before it hits the body:
Code:
echo "To: $SERVER_OWNER"
echo "Cc: $ENDUSER, $REQUESTOR"

It works and now I can remove this pathetic line in the email: "This email was also sent to person1, person2, person3 (Outlook Mail Merge does not allow cc)" These emails will now look much more professional.

@methyl I'm not a spammer just someone who creates 40 - 70 accounts each day for a company and trying to streamline a process. I've asked several legitimate questions so I would appreciate it if you do not file accusations against me.
# 5  
Old 02-21-2012
Apologies MaintdotC. It was the "-f NO-REPLY@domain" and the lack of information that made me question (not accuse).
# 6  
Old 02-22-2012
Well, sendmail is very tricky in other modes, but as a mail sending client, it has no gui, does not receive, reply or forward, does not help you compose html email (and demands more effort if you do), does not support cc/bcc/ except by this obtuse and indirect way of embedding and then parsing back. Stuff that makes Mac people run screaming from the room. Smilie
# 7  
Old 07-22-2012
I wonder if Sendmail has a clause in its license that royalties should be paid if used in a business environment...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Clarifying sendmail configuration - sendmail-client offline

Hi all, I have read about sendmail running as 2 separate process. 1 as a MSP, and the other as the real daemon or MTA. In my current configuration, the sendmail-client is disabled. Both submit.cf and sendmail.cf are left as default untouch I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies

2. Shell Programming and Scripting

Showing error

if ; then rm -rf "${x}"_"${y}"_abc_pqr.dat error: `then' unmatchedCan anyone please help me in correcting it. Please use code tags next time for your code and data. Thanks (2 Replies)
Discussion started by: D_Sethi
2 Replies

3. UNIX for Dummies Questions & Answers

Problem getting mailx to send true Bcc mail to multiple recipients

I am having trouble getting mailx to send multiple Bcc mails out without everyone in the list of recipients seeing everyone else's email addresses. I looked at the man pages of my system and seem to be following the syntax correctly, but the mails still go out as if I were just putting in a list of... (7 Replies)
Discussion started by: legrandtimonier
7 Replies

4. UNIX for Advanced & Expert Users

Sendmail questions, SCO 5.0.6 sendmail 8.11.0

I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back. (reason: 530 5.7.1 Authentication required) 530 5.7.1 Authentication required Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies

5. UNIX for Advanced & Expert Users

Multiple recipients with sendmail

Hi, I use the following to send a mail : sendmail -v someone@box.com < /appli/oracle/rap.txt Can I give several mail address for destination ? How ? For exemple : sendmail -v someone@box.com, someone2@box.com, someone3@box.com < /appli/oracle/rap.txt Thank you. (6 Replies)
Discussion started by: big123456
6 Replies

6. Programming

Python: multiple email recipients

I am using a the following backup script to backup a server to USB. USBBackupScript - RdiffBackupWiki However I don't know python and would like to alter the script so I can send emails about the success or failure of the backup to multiple recipients. I did do some research but the limit... (0 Replies)
Discussion started by: jelloir
0 Replies

7. AIX

5.2 who not showing all login

I have 1 box running 5.2 and another running 5.3. Both use the NIS accounts and NFS home directories. Users can telnet on to both and 'who' displays the login. However when users run xterms using a remote X server (e.g. Exceed), by telnetting then running /usr/bin/X11/xterm -d xxx.xxx.xxx.xxx:0 ... (1 Reply)
Discussion started by: spitzie
1 Replies

8. UNIX for Dummies Questions & Answers

using mailx with multiple recipients

I am trying to use a file containing email addresses in my mailx command like the following: SUBJECT="Kronos User Report" BODY="kronos.txt" MAILTO="kronosmail.txt" mailx -s "$SUBJECT" $MAILTO < $BODY This works fine for the body of the message but for the recipient it says: ... (6 Replies)
Discussion started by: sdhalepaska
6 Replies

9. Post Here to Contact Site Administrators and Moderators

Posts not showing up

I received the following e-mail notification, but neither this post nor my previous post is showing up. ---------------------------------------------------------------- patwa has just replied to a thread you have subscribed to entitled - Waiting between commands - in the UNIX for Dummies... (1 Reply)
Discussion started by: cfajohnson
1 Replies

10. UNIX for Dummies Questions & Answers

ps -ef not showing all info

Hi there, How can I expand the command filed sizing when using a ps command. With diretories and script names and parameters being set I'm not getting some of the information that I need (at the end of the command line). I'm using HP_UX 11i. Cheers, Neil (2 Replies)
Discussion started by: nhatch
2 Replies
Login or Register to Ask a Question