loveubaan
16th February 2006, 13:17
Hi

Well i m trying to send a file as attachment in mail but have not achived it.

i have gone throug almost all the threads related to sending mail using different commands like mailx , mail, mutt , sendmail , blat etc

Syntex for mailx that i m using :

uuencode source_file dest_file | mailx -s "subject" email@a.com

But the problem is that i m getting the mails without attachment

What i think is that mailx is not the proper command to send attachment on Sun Solaris Server although it might be working on HP-UX servers.

Plz suggest the commad , format , method to do this.

Regards

NvpBaaN
16th February 2006, 13:29
Hi,
Instead, try using mailx -its < filename. Before this command, be sure to attach the attachment file to the drafted mail text, using "uuencode".

1. Write the mail text (draft) in file1
2. Attach attachment file to file1 using uuencode
3. Use mailx -its < file1

Check commands uuencode and mailx for accurate info, as these depend on the version in use...

Regards.

bdittmar
16th February 2006, 18:37
Hello,

check the man pages :

EXAMPLES
To encode and send a compiled program foo to user friend:

uuencode foo foo | mailx -s 'new program' friend@domain.x

After receiving the mail message, user friend can decode the program
by first saving the message in a file foo.mail and executing the
command:

uudecode foo.mail

WARNINGS
The file is expanded by 35% (three bytes become four plus control
information) causing it to take longer to transmit.


Regards

norwim
16th February 2006, 21:42
Hi there,

I have no access to a system to check atm .... but I remember that I had to fiddle a bit until I achieved sending an attachment.
The problem was that I didn't specify the name of the file that was uuencoded.
And I am very sure that I used 3 filenames and then it worked.
One filename for the source, one that specified the name to be included in the uuencoded file and the third for the destination file.
I had yet another file that contained the message text, To: From: Subject: etc.
So what finally worked was something like this (IIRC):
uuencode datafile datafile.txt > datafile.uuenc
cat mess.file datafile.uuenc | /usr/sbin/sendmail

hth

Norbert

loveubaan
21st February 2006, 11:08
Hey man

thanks to u all for ur valuable comments.

Actually the syntex that i have written in my first post is working fine.


the problem was with lotus notes.
i tried it on other mail tilities . its working fine.


Thanks again for help.