Sponsored Content
Top Forums Shell Programming and Scripting How to send email with multiple attachments ? Post 302690303 by methyl on Wednesday 22nd of August 2012 07:43:42 PM
Old 08-22-2012
It is painful when someone cannot post the version of HP-UX (which appears clearly in uname -a).

Anyway, assuming that this is a modern version, /sbin/sh will be the Posix Shell.

Corona688 has hit the nail on the head. The solution posted largely fits the bill.
There are differences between unix and MSDOS text file formats. I would convert the files if the mail reader is likely to be a Microsoft mail client.

Code:
(cat "${file1}"|ux2dos|uuencode "${file1}"; cat "${file2}"|uuencode "${file2}") | mailx -m -s "File" xxx@xx.com

The only change I might make is to ensure the the names of the files in $file1 and $file2 are formatted to MSDOS standards. e.g. If the file is a Text file it should have the extension ".txt" such that the recipient can open the file with Windows Notepad.

Normally MSDOS File Extensions are totally irrelevant in unix, but in email attachments they are important.

Ps. Your Option 2 is a non-starter. It contains too many syntax errors.
This User Gave Thanks to methyl For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help ! How to get elm to send multiple attachments - in batch mode

From a program, I want to execute a UNIX elm command that will send multiple txt attachment files to an email address. I can do it for one attachment only ie. "elm -s"subject" emailaddress < attachment.txt" 1. The attachment is received in the body of the email and not as an attachment. 2. The... (1 Reply)
Discussion started by: anarvan
1 Replies

2. UNIX for Dummies Questions & Answers

to send email to multiple users

hi, i'm pretty new to this unix. i've been asked to create a shell script which will pick up the email id from a text file(stored in same machine, same directory) searches for that id in another file in which a product name( a one line text) is mentioned against it. then it should send a mail... (0 Replies)
Discussion started by: vishwas.shenoy
0 Replies

3. Shell Programming and Scripting

Not able to send multiple attachments using uuencode and mailx

Hi, I am seeing some junk characters when I attach the second file, given below is the logic I used. Please help me resolving the issue. ( uuencode file1.txt file1.txt.lst && uuencode file2.txt file2.txt.lst ) > attachment.txt cat body.txt attachment.txt > combinemail.txt mailx -m... (7 Replies)
Discussion started by: prasperl
7 Replies

4. Shell Programming and Scripting

Script to send email after comparing the folder permissions to a certain permission & send email

Hello , I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them . I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies

5. UNIX for Advanced & Expert Users

Email with multiple attachments & HTML body

I have a html file: # cat sample.html <html> <body> Sample HTML file</p> </body> </html> And I have two excel sheets (sheet1.xls & sheet2.xls) I want to send an email by having the sample.html as the message body and two spreadsheets as the attachments. I tried using the below command:... (12 Replies)
Discussion started by: BHM
12 Replies

6. UNIX for Dummies Questions & Answers

Send Files as Attachments through email

Dear Members, I am trying to send a file as an attachment from the command prompt in Linux. I am using the following: (echo "Find attached Exception Report"; uuencode $DATA_TOP/out/data/$err_rpt_file $err_rpt_file)|/bin/mailx -s "***Exceptions Found" davidk@xyz.com Here err_rpt_file... (2 Replies)
Discussion started by: sandeep_1105
2 Replies

7. Red Hat

How to send mail with multiple attachments?

We don't have uuencode installed in our machines..... Please tell me how to send mail with multiple attachments ??? URGENT !!!!! Please tell me using command line (or) scripts.......... please...... Thanks in Advance.... (1 Reply)
Discussion started by: vamshigvk475
1 Replies

8. Shell Programming and Scripting

Mail command --> send multiple attachments

Hi, i try to send two (multiple) files by the mail-console-command mail -s TEST -a f1.pdf f2.pdf n.ame@ms123.de but it doesn't work. can someone give me a hint? Thanks in advance, IMPe (2 Replies)
Discussion started by: IMPe
2 Replies

9. HP-UX

Email Using uuenview w/ Multiple Attachments

HP-UX mbhp7640 B.11.31 U ia64 4294967295 unlimited-user license Our database builds a MIME compliant html email, then cats that to sendmail - no problem. Due to horrible issues with the native uuencode, we long ago began using uuenview to encode our attachments - no problem. An example is... (1 Reply)
Discussion started by: bubba77
1 Replies
GLFRAMEBUFFERPARAMET(3G)					   OpenGL Manual					  GLFRAMEBUFFERPARAMET(3G)

NAME
glFramebufferParameteri - set a named parameter of a framebuffer C SPECIFICATION
void glFramebufferParameteri(GLenum target, GLenum pname, GLint param); PARAMETERS
target The target of the operation, which must be GL_READ_FRAMEBUFFER, GL_DRAW_FRAMEBUFFER or GL_FRAMEBUFFER. pname A token indicating the parameter to be modified. param The new value for the parameter named pname. DESCRIPTION
glFramebufferParameteri modifies the current value of the parameter named pname in the framebuffer bound to target. target must be GL_READ_FRAMEBFUFFER, GL_DRAW_FRAMEBUFFER or GL_FRAMEBUFFER. The token GL_FRAMEBUFFER is treated as GL_DRAW_FRAMEBUFFER. A non-default framebuffer must be bound to target. pname specifies the parameter to be modified. The following symbols are accepted in pname: GL_FRAMEBUFFER_DEFAULT_WIDTH param specifies the assumed with for a framebuffer object with no attachments. If a framebuffer has attachments then the width of those attachments is used, otherwise the value of GL_FRAMEBUFFER_DEFAULT_WIDTH is used for the framebuffer. param must be greater than or equal to zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_WIDTH. GL_FRAMEBUFFER_DEFAULT_HEIGHT param specifies the assumed height for a framebuffer object with no attachments. If a framebuffer has attachments then the height of those attachments is used, otherwise the value of GL_FRAMEBUFFER_DEFAULT_HEIGHT is used for the framebuffer. param must be greater than or equal to zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_HEIGHT. GL_FRAMEBUFFER_DEFAULT_LAYERS param specifies the assumed number of layers for a framebuffer object with no attachments. If a framebuffer has attachments then the layer count of those attachments is used, otherwise the value of GL_FRAMEBUFFER_DEFAULT_LAYERS is used for the framebuffer. param must be greater than or equal to zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_LAYERS. GL_FRAMEBUFFER_DEFAULT_SAMPLES param specifies the assumed number of samples in a framebuffer object with no attachments. If a framebuffer has attachments then the sample count of those attachments is used, otherwise the value of GL_FRAMEBUFFER_DEFAULT_SAMPLES is used for the framebuffer. param must be greater than or equal to zero and less than or equal to the value of GL_MAX_FRAMEBUFFER_SAMPLE. GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS param specifies whether the framebuffer should assume identical sample locations and the same number of samples for all texels in the virtual image. If param is zero, then the implementation may vary the position or the count of samples within the virtual image from pixel to pixel, otherwise it will use the same sample position and count for all pixels in the virtual image. ERRORS
GL_INVALID_ENUM is generated if target is not one of the accepted framebuffer targets. GL_INVAILD_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_WIDTH and param is less than zero or greater than the value of GL_MAX_FRAMEBUFFER_WIDTH. GL_INVAILD_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_HEIGHT and param is less than zero or greater than the value of GL_MAX_FRAMEBUFFER_HEIGHT. GL_INVAILD_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_LAYERS and param is less than zero or greater than the value of GL_MAX_FRAMEBUFFER_LAYERS. GL_INVAILD_VALUE is generated if pname is GL_FRAMEBUFFER_DEFAULT_SAMPLES and param is less than zero or greater than the value of GL_MAX_FRAMEBUFFER_SAMPLES. GL_INVALID_OPERATION is generated if the default framebuffer is bound to target. ASSOCIATED GETS
glGetFramebufferParameteriv(). SEE ALSO
glVertexAttribBinding(), glVertexAttribFormat(), glVertexAttribPointer(), glVertexBindingDivisor(). COPYRIGHT
Copyright (C) 2012 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/. AUTHORS
opengl.org opengl.org 06/10/2014 GLFRAMEBUFFERPARAMET(3G)
All times are GMT -4. The time now is 04:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy