Sponsored Content
Top Forums Shell Programming and Scripting send mail attachment to lotus notes Post 302188745 by vgersh99 on Thursday 24th of April 2008 06:49:08 AM
Old 04-24-2008
Quote:
Originally Posted by era
The file names are identical but unique?

Do you mean send mail to a bunch of users?

Code:
for user in tom dick harry; do
  uuencode $user/identical.pdf | mailx -s "Your personal PDF" $user@domain.example.com
done

This assumes you have three users, and three directories named after those users. So it will send tom/identical.pdf to tom@domain.example.com, dick/identical.pdf to dick@domain.example.com, and harry/identical.pdf to harry@domain.example.com

If this is not what you wanted, perhaps you can explain in more detail.

See also the FAQ: How do I send email? - The UNIX Forums

Update: Apparently Lotsa Nuts doesn't grok uuencode so you will need something like https://www.unix.com/faq-submission-q...tachments.html
Yeah, Notes is finicky when it comes to 'uuencode'. One way 'round is to tar up file(s) first and then uuencode it - something along these lines:
Code:
for user in tom dick harry; do
  tar cvf /tmp/$user_identical.tar $user/identical.pdf
  ( uuencode /tmp/$user_identical.tar /tmp/$user_identical.tar) | mailx -s "Your personal PDF" $user@domain.example.com
  \rm -rf /tmp/$user_identical.tar 2>/dev/null
done

Or of course with multiple attachments!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix to Lotus Notes email attachment

We have been trying to get an email from unix to Lotus Notes to work. We finally got it to work with the following code: cat filename | uuencode filename | mailx -s "subject title" email address Now our problem is that Lotus Notes doesn't show the paper clip icon, indicating an attachment... (3 Replies)
Discussion started by: cowgilm
3 Replies

2. UNIX for Dummies Questions & Answers

unix to Lotus Notes email attachment

Hi all, I have searched the FAQ and find that there is some threads related to this subject. But can you please give an examples on how to send attachment to Lotus Notes email through UNIX? Since i have gone through the RFC and the URL. But i still have no idea on it. Please give some... (7 Replies)
Discussion started by: wilsonchan1000
7 Replies

3. UNIX for Advanced & Expert Users

send mail to a UNIX machine to my Lotus Notes

Hi, I'am new in system administration, and I would like to send file from my UNIX machine running on Aix 4.3.3 to the Lotus Notes V5 mail of my colleagues . So I heard about the sendmail command, but I don't know excatly how to use it for send my files . Please if you have a idea, help me !!! (1 Reply)
Discussion started by: hugo
1 Replies

4. UNIX for Advanced & Expert Users

how to send mail from aix to lotus with dns

hi , before installing dns on my server, all was ok I was able to send message from aix to my lotus notes server thanks to this command: mail -v aaaaaaaaaa@bbbbbbb.fr in my /etc/hosts , there was xx.xx.xx.xx lotus xx.xx.xx.xx server name in my... (3 Replies)
Discussion started by: hubert
3 Replies

5. Shell Programming and Scripting

Reading from Lotus notes mail server

Hi, is there any way Unix shell script can directly read a mail on a mail server (Lotus notes) and save it as a text file in a unix directory ? For eg mail can be at abc@xyz.com and the same should be stored at home/script on def.com (0 Replies)
Discussion started by: misenkiser
0 Replies

6. UNIX for Advanced & Expert Users

Mail with several attachments screwed up in Lotus Notes

Hi everybody! I needto send a mail with several attachments to a foreign recepient using the following command line: neo$ (cat mailbody; uuencode file1 file1.txt; uuencode file2 file2.txt) | mailx -m -s "Mail with two attachments" john.hancock@mailserver.com The result is just fine on... (3 Replies)
Discussion started by: marvin70
3 Replies

7. Shell Programming and Scripting

How to send a mail with attachment?

Hi, I usually write a file TEST.MAIL like this to send mails: Importance: High Priority: Urgent X-Priority: 1 (Highest) From: user Subject: error ... text body .... and then I launch it (or writre a c-chell that launchs it) by writing: mail a@b.com < /users/.../TEST.MAIL How can... (4 Replies)
Discussion started by: albaalbetti
4 Replies

8. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

9. Shell Programming and Scripting

Send mail as attachment

Hi All, I am trying to send mail via unix and attaching file along with that mail, but facing issue while sending. I have tried below commands- 1)- uuencode $prmDirOutput/report_mailbody $prmDirOutput/report_mailbody | mailx -s "Acknowledgment file- $subject" $email_id 2)- mutt -a... (4 Replies)
Discussion started by: Amit786
4 Replies

10. Shell Programming and Scripting

Send Mail With Attachment

Hi, I need to send attachment with email as external attachment. Presently, we are using uuencode to make an attachment but it is going as content of body. We are using below command. uuencode "filename1" "filename2" | mailx -r "$SENDFROM" ${SENDTO} In unix box, -a is not supportable... (1 Reply)
Discussion started by: vamshi929
1 Replies
uuencode(1)						      General Commands Manual						       uuencode(1)

NAME
uuencode, uudecode - encode a binary file, or decode its representation SYNOPSIS
uuencode [-m] [ file ] name uudecode [-o outfile] [ file ]... DESCRIPTION
Uuencode and uudecode are used to transmit binary files over channels that support only simple ASCII data. Uuencode reads file (or by default the standard input) and writes an encoded version to the standard output, using only printable ASCII characters. The encoded output begins with a header, for use by uudecode, which records the mode of the input file and suggests name for the decoded file that will be created. (If name is /dev/stdout then uudecode will decode to standard output.) The encoding has the format documented at uuencode(5), unless the option -m is given, when base64 encoding is used instead. Note: uuencode uses buffered input and assumes that it is not hand typed from a tty. The consequence is that at a tty, you may need to hit Ctl-D several times to terminate input. Uudecode transforms uuencoded files (or standard input) into the original form. The resulting file is named name (or outfile if the -o option is given) and will have the mode of the original file except that setuid and execute bits are not retained. If outfile or name is /dev/stdout the result will be written to standard output. Uudecode ignores any leading and trailing lines. The program determines from the header which of the two supported encoding schemes was used. EXAMPLES
The following example packages up a source tree, compresses it, uuencodes it and mails it to a user on another system. When uudecode is run on the target system, the file ``src_tree.tar.Z'' will be created which may then be uncompressed and extracted into the original tree. tar cf - src_tree | compress | uuencode src_tree.tar.Z | mail sys1!sys2!user SEE ALSO
compress(1), mail(1), uucp(1), uuencode(5) STANDARDS
This implementation is compliant with P1003.2b/D11. BUGS
If more than one file is given to uudecode and the -o option is given or more than one name in the encoded files are the same the result is probably not what is expected. The encoded form of the file is expanded by 37% for UU encoding and by 35% for base64 encoding (3 bytes become 4 plus control information). REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>. Please put sharutils or uuencode in the subject line. It helps to spot the message. HISTORY
The uuencode command appeared in BSD 4.0. uuencode(1)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy