How to attach two files in unix script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to attach two files in unix script
# 15  
Old 12-07-2010
The attachment comes as an inline text to my lotus email id. But my requirement is to send it as an attachment.....
# 16  
Old 12-07-2010
Quote:
Originally Posted by meva
The attachment comes as an inline text to my lotus email id. But my requirement is to send it as an attachment.....
Ok but did you try to send the mail to an external mail like someone@yahoo.com or someone@gmail.com ?
and check wether you also get it inline ?

Maybe your server does not allow attachement sending and put it inline ?
Have you ever been able to send an attachement in the past ? (not by using your script, but just by sending it normally)
# 17  
Old 12-07-2010
Quote:
Originally Posted by meva
... snip ...
then the email body looks as given below
Quote:
Hi
aa bb cc
aa bb cc
whereas my requirement is that the files to be attached to the email and the body of email should only have the "Hi" as its text.
It looks like your uuencode program is just copying the file as-is, can you check this by doing a uuencode from the command line, you should see something like this:

Code:
 $ cat file1
aa bb cc
 
$ uuencode file1 file1
begin 644 file1
)86$@8F(@8V,*
`
end

# 18  
Old 12-08-2010
Quote:
Originally Posted by ctsgnb
Ok but did you try to send the mail to an external mail like someone@yahoo.com or someone@gmail.com ?
and check wether you also get it inline ?

Maybe your server does not allow attachement sending and put it inline ?
Have you ever been able to send an attachement in the past ? (not by using your script, but just by sending it normally)
I tried sending the attachment to email like someone@yahoo.com or someone@gmail.com and am getting it as expected i.e. the files are attached to the email.

But even i tried sending mails to my lotus id manually with two attachments and am able to view the two files as an attachment.Am facing issue when i send it as an attachment through script to my lotus ID.
# 19  
Old 12-08-2010
Quote:
Originally Posted by meva
I tried sending the attachment to email like someone@yahoo.com or someone@gmail.com and am getting it as expected i.e. the files are attached to the email.
This demonstrate that the mail you have generated is correct so that it is not the source cause of your problem.

The cause of your problem should be a faulty configuration somewhere in the transfer and/or reception part.

Next question is : when sending your mail to external address, does it go through the same SMTP server than when sending to your Lotus Notes ?

Or is the SMTP server setup with some special rules for the mails whose destination is internal to the society (Lotus Notes) ?

Or is your Lotus Notes Client configured a specific way ?
Are your client and server version up to date ? (maybe missing some patch containing MIME conversion fix ?)
# 20  
Old 12-08-2010
so do we need to write script for MIME conversion? i have a sample script which is used for MIME conversion but that script can be used to send only one attachment Smilie ....
# 21  
Old 12-08-2010
what type of file are you sending as attachement ?
(Lotus may embedded image file inline whereas they are sent as attachment).
You can then try to create a zip file containing your files and try to send the zip file as attachement.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Attach filename to wc results on massive number of files

Hello, I have massive number of big files that needed to be counted for the total number of lines (> 100x millions) each. I want the file name attached to the count results so that they are aligned nicely matching name and counts. I could do each file at a time, which will take hours to finish,... (8 Replies)
Discussion started by: yifangt
8 Replies

2. Shell Programming and Scripting

Script to attach latest files of directories in a mail.

Hello Folks, I am looking for the script which will go to directory and check for the latest 5 files and send a mail to attaches these files to user. Kindly guide. Regards (7 Replies)
Discussion started by: sadique.manzar
7 Replies

3. Shell Programming and Scripting

UNIX - how to send attach excel in mail

Hi Experts, i need your help here :confused: Need to send a report thru mail using unix shell script(AIX). can you help me to do this? . i tried "uuencode" with CSV format, but while reading report all values are in single column. i need each column values in separate cell. Thanks in... (9 Replies)
Discussion started by: newbieabc
9 Replies

4. Shell Programming and Scripting

How to attach multiple .csv files using mutt command

I need to attach all files starting with 'BusinessReport' using mutt command. It could be any number of files in that directory, say BusinessReport_01, BusinessReport_03, BusinessReport_04 etc. Is there a way to attach all files where filename like BusinessReport_* and sent it using mutt... (2 Replies)
Discussion started by: Jassz
2 Replies

5. Shell Programming and Scripting

Script to attach file to mail

Hello, I have a .dat file containing one line. I need a script to read that line and make it part of the body and send a mail... Let's say the line is $line. I need the script to send a mail with the body "The last disposal feed is $line". Thanks (4 Replies)
Discussion started by: sfetea
4 Replies

6. Shell Programming and Scripting

Attach a binary file to email in a script

Hi, I am trying to get an email sent out by the unix ( aix ) system that has a .gz file attached to it. I can get the attachment, but it's not working when being looked at from outlook. I think there is a problem because of the way I am doing it, and the fact that it's binary. I am trying to... (15 Replies)
Discussion started by: fwellers
15 Replies

7. Shell Programming and Scripting

attach multiple files in email

I am trying to send multiple files as attachment in one email, I tried to search but couldn't find. Please let me know if any solutions. (2 Replies)
Discussion started by: mgirinath
2 Replies

8. Shell Programming and Scripting

attach 2 files using mailx

if test.dat is the file cat test.dat|uuencode test.dat|mailx -s "subject" mailid can be used for attaching test.dat how can i attach more than one file to a mail using mailx (2 Replies)
Discussion started by: anumkoshy
2 Replies

9. UNIX for Advanced & Expert Users

pine does'nt attach files

Hello All, I am maintaining a server and I use pine as MUA and sendmail as MTA. Suddenly many users in the network face the problem of not being able to attach files using pine. I checked the sendmail.cf file and found a variable "MaxMessageSize = 1000000". Eventhough the message size... (2 Replies)
Discussion started by: maybemedic
2 Replies
Login or Register to Ask a Question