mail or mailx attachment


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers mail or mailx attachment
# 1  
Old 02-28-2005
mail or mailx attachment

I have used the forum to determine the format required to send attachments from hp-ux 11. the problem I have is that using mailx does not attach the file, but subsititing mailx for mail on the command line attaches the file but i'm not able to specify a subject?

The attachment has been convert to uuencode format:

mailx -s"test" email@domain.com < uuencodefile

Thanks for your help.

Brett.
# 2  
Old 03-02-2005
You need to be more specific about your problem:
Quote:
using mailx does not attach the file, but subsititing mailx for mail on the command line attaches the file but i'm not able to specify a subject
If you use mailx -s "test" myself@somedomain.com < /etc/hosts
do you get the email with a subject as 'test'?
If you use mailx -s "test" myself@somedomain.com < uuencodefile, what happens?

Please explain further on stating "mailx does not attach the file" versus "substituting mailx for mail...attaches the file"
# 3  
Old 03-07-2005
Quote:
Originally Posted by RTM
You need to be more specific about your problem:


If you use mailx -s "test" myself@somedomain.com < /etc/hosts
do you get the email with a subject as 'test'?
If you use mailx -s "test" myself@somedomain.com < uuencodefile, what happens?

Please explain further on stating "mailx does not attach the file" versus "substituting mailx for mail...attaches the file"
To clarify:

I want to send email from UNIX with an attachment (a csv) and a subject, we are using HP-UX 11.11.

When I use the mailx command from my original post the file I am trying to attach does not appear as an attachment, it is embeddded within the message, and the subject is shown.

When I use mail the file does appear as an attachment in Outlook, but I can only get this to work when I don't specify a subject, as below:

mail me@mydomain < uuencoded file

If I specify a subject the error is returned:

mail: illegal option -- s
usage: mail [+] [-epqr] [-f file]
mail [-dt] persons

For the tests you suggested: Using the first command line I get the word test in the subject and the hosts file in the message area.

The second test has the same result as the first.

Cheers

Brett.
# 4  
Old 03-07-2005
Okay, you can't use the mail command - there is no -s (subject) option - use mailx.

For the attachment, look at this forum - one should be what you want.

email attachments
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need help sending attachment via mailx

Hello, I am new to the Unix thing, and I am having trouble sending attachments via shell client putty through mailx. The command I use is $ mailx -s "Subject" user@blah.com < attachment.txt but everytime I do that it would say Cannot open attachment.txt I have the file save to my computer... (5 Replies)
Discussion started by: mrobin20
5 Replies

2. Solaris

mailx with attachment

Hi, When i used below command, i am able to send mail mailx -s "Testing mail working or not " babu.sudhakar@ymail.com" but if i want send attachment with mail,which syntax i need to follow to send a file as attachment. (3 Replies)
Discussion started by: sridhardwh
3 Replies

3. Shell Programming and Scripting

send attachment and body in one mail using mailx

Hi, Our requirement is to send an attachment and content in a single mail. I am using the below command to send attachement. --------------------- (uuencode $exp_file $exp_file) |mailx -s "$email_subject" $EmailRecipients -------------------- I m not able to send any message in the... (4 Replies)
Discussion started by: ashwin3086
4 Replies

4. 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

5. HP-UX

mailx with -m attachment corrupted

mailx with -m command sending emails with attachments correctly to all users except users who have email on microsoft exchange server. They are receiving attachments as garbled text in mail body (5 Replies)
Discussion started by: sankalpag
5 Replies

6. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

7. Shell Programming and Scripting

Adding an attachment as an attachment to mailx

I don't want the attachment embedded in the mail. I would like a file attached. When I do mailx -s "Report, `date +'%D %r` " -r "Notifications" bob@bob.com < /usr/local/bin/myreport.log> /dev/null It gets embedded in my email. I want a file attachment. How do I do that? (2 Replies)
Discussion started by: guessingo
2 Replies

8. UNIX for Advanced & Expert Users

how to send file as attachment using mail or mailx

I have a need to send a file from the unix command line to be sent as an attachment. Is this possible? That is when I open my outlook email I need to file to appear as an attachment. Also, is there a way to use the mail binary (not mailx) to modify the "reply address". mailx -r works but I need... (1 Reply)
Discussion started by: kieranfoley
1 Replies

9. Shell Programming and Scripting

Problem with Mailx command to send mail with attachment

Hi, I am using mailx command to send a mail with attachment. It's working fine, but with attachment I am getting one extra attachment like (ATT00131.txt). I have tried to use unix2dos command also. But still I am getting the extra attachment. I am using the following code: subject="temp... (5 Replies)
Discussion started by: viswanatharv
5 Replies

10. UNIX for Advanced & Expert Users

mailx commannd - Mail and Attachment in same mail

Hi , I am using mailx command for sending the mails. Rightnow I am sending the attachment (by using uuencode $filename) as a seperate mail.I wanna send the attachment also with the same mail. (6 Replies)
Discussion started by: sharif
6 Replies
Login or Register to Ask a Question