Sponsored Content
Top Forums Shell Programming and Scripting Mailing multiple PNG attachments using sendmail Post 302934096 by gandolf989 on Wednesday 4th of February 2015 02:42:56 PM
Old 02-04-2015
As far as I know uuencode , mailx, sendmail and mpack are all capable of sending an email with a single attachment. You should look at the various Perl libraries to see if one works for you. I have used MIME::Lite in the past. There are scripts that you can find online with your favorite search engine. Just add logic for additional attachments.
This User Gave Thanks to gandolf989 For This Post:
 

10 More Discussions You Might Find Interesting

1. Answers to Frequently Asked Questions

multiple attachments

how can you send multiple attachments in 1 email, usually I just use uuencode to send 1 attachment. thanks (5 Replies)
Discussion started by: edog
5 Replies

2. How do I send email?

multiple attachments

how can you send multiple attachments in 1 email, usually I just use uuencode to send 1 attachment. thanks (5 Replies)
Discussion started by: edog
5 Replies

3. UNIX for Advanced & Expert Users

mailing with attachments in mail command in HP-UX Release 11i

Hi Can some one tell me how to send a mail with body and file attached in a shell sript, in HP-UX Release 11i. i did code in AIX and it works fine but i guess here in HP-UX release.. there's some syntax change which i;m not able to make out.. TIA, Ronnie (1 Reply)
Discussion started by: rosh0623
1 Replies

4. UNIX for Dummies Questions & Answers

sendmail attachments

Dear all, I've been working with AIX for, um, 15 years now and I have read all I can about the above, but I am stuck. Everything seems to point to using sendmail on the command line to embed a uuencoded attatchment will not work. Using something like "(cat plain.txt;uuencode attach.file... (4 Replies)
Discussion started by: rbatte1
4 Replies

5. Shell Programming and Scripting

sendmail with attachments

Hi, I got the following script from Ygor on this site: #!/usr/bin/ksh export MAILTO="email_address" export CONTENT="/export/home/aisdba/email_body.html" export SUBJECT="subject of email" ( echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo "Content-Type: text/html" echo... (9 Replies)
Discussion started by: suthera
9 Replies

6. Shell Programming and Scripting

E-mailing Multiple Attachments in AIX

Hello Everyone, I'm trying to write ascript on AIX 5.3, that will e-mail all filles within a directory. But on executing a script , it sends only 1 file from the directory alongwith some Junk data. I have searched whole forum and almost used all the suggestions, but still getting same problem.... (4 Replies)
Discussion started by: Gem_In_I
4 Replies

7. Shell Programming and Scripting

Sendmail Script: Gmail cannot find attachments

Hi. I am using a script on HP-UX to send emails that include a Pdf attachment to clients. The scipt makes use of sendmail. The scripts works for everything except gmail. When I go on gmail via my Web Browser, I can see the message with the attachment, but if I try to view or download the... (2 Replies)
Discussion started by: Wahooka
2 Replies

8. Shell Programming and Scripting

Sendmail Png Attachments

I use sendmail to send html emails, my script works perfect and sends email with plain text attachment. Now i need to attache png file to the email and this attachment part is not working. ( echo "From: $FROM" echo "To: $TO" echo "MIME-Version: 1.0" echo "Subject: $SUBJECT" echo... (4 Replies)
Discussion started by: posner
4 Replies

9. Shell Programming and Scripting

Sendmail gz Attachments

Hi All, I have a problem again with sendmail content type . I am trying to attach the gz file to the html email but couldnt figure out even after extensive google. Here is my code. ( echo "From: $FROM" echo "To: $MAILTO" echo... (3 Replies)
Discussion started by: posner
3 Replies

10. Shell Programming and Scripting

Sendmail - Attachments & Subjects

Hi All, Not been around in a while. However I have been all over tinternet (google) for days looking for a solution. Where I work has decided to use Sendmail on our Linux and Unix estate for sending emails via scripts. So I am hoping to eventually get a working solution for Sendmail and not... (3 Replies)
Discussion started by: dakelly
3 Replies
UUENVIEW(1)                                                   General Commands Manual                                                  UUENVIEW(1)

NAME
uuenview - a powerful encoder for binary files SYNOPSIS
uuenview [options] file(s) DESCRIPTION
uuenview encodes a binary file into ASCII text for sending over non-8-bit electronic data channels, such as electronic mail or the usenet. uuenview is a superset of and fully backwards compatible with the standard uuencode(1) command, featuring more comfort and more flexibil- ity. Files encoded with uuenview are compatible with virtually all decoders, as long as the encoding method (see below) is supported by the remote side. If the remote side uses uudeview(1), there shouldn't be any problems at all. If properly configured, uuenview can directly send encoded files by email or to the usenet. These messages are wrapped into a proper MIME envelope, which is handy if the recipient uses MIME-compliant mail or news software. OPTIONS
ENCODING SELECTION -b Chooses the Base64 encoding method as specified by the MIME standard. -u Chooses the uuencoding method, for compatibility with uuencode(1). -y Chooses the yEncoding method. -x Chooses the now obsolete xxencoding method. -t Sends the file(s) as plain text. -q Encodes the file(s) using quoted printable encoding. These options are positional and affect the encoding of all remaining files on the command line until changed. When sending, posting or attaching files, the default is to use Base64, resulting in MIME compliant messages. Otherwise, when encoding to standard output or into a file, the default is to use uuencoding. TARGETS -o Specifies that output shall be written into files. These files will have the same base name as the source file and an extension of .001, .002 etc, depending on the number of parts required by the -lines option. The encoded files are written to the current direc- tory. -od path Same as '-o', but the encoded files are written to the given directory instead. -m email Mails the encoded file(s), each one probably split into multiple parts, to the given email address. Multiple recipients can be given as a quoted, comma-separated list. On Unix systems, mail is usually piped to sendmail(8). -p newsgroup Posts the encoded file(s), each one probably split into multiple parts, to the given newsgroup. Multiple newsgroups can be given as a quoted, comma-separated list. The inews(1) program is invoked for posting. You may have to set the NNTPSERVER enviroment variable to your news server. -a Attaches files. This feature is expected to be used from shell scripts and the like. In attach mode, a message is read from standard input, complete with headers. The files given on the command line are then "attached" to the message, which is converted, if neces- sary, to a proper MIME multipart format. The -a option can be combined with -m or -p in order to directly mail or post the result. Else, the message, complete with attachments, is written to standard output. If no target option is given, the encoded data is printed to standard output. HEADERS When mailing or posting a file, it is possible to set certain headers. Be careful to quote parameters that consist of more than one word. -s subject Set the Subject: header line. The file name and part number are automatically appended. Without this, a default subject header is generated. -f from Set the From: header line. -r reply Set the Reply-To: header line. OTHER -v Verbosely prints everything the program's trying to do. -lines Substituting lines with a number, sets the maximum number of encoded lines per part. The encoded data is automatically split into as many parts as required. Line counts less than 200 are ignored. The uuencoding and xxencoding methods encode 45k, and Base64 encodes 57k of data in 1000 lines. If this option is not specified, the default is unlimited lines per part, resulting in exactly one part. file(s) One or more filenames to be processed. To encode a file from the standard input, use a single hyphen '-' and give a filename to be used for the encoded file as the next parameter. Options may also be set in the $UUENVIEW environment variable, which is read before processing the options on the command line. NOTES
Files read from standard input can only be used once, meaning that at most one target option may be given. Output written to standard output cannot be split into multiple parts. In this case, the -lines option is ignored. uuenview must be correctly configured at compile time in order for mailing and posting to work. If it doesn't, consult your system adminis- trator. The program used for posting a file can be set at runtime using the INEWS environment variable. This setting overrides the com- pile-time configuration. Base64 is not MIME. Base64 is the encoding specified by the MIME standard, but in order for a message to become a proper MIME message, a number of headers are required. uuenview produces these headers when mailing or posting, but not when writing to a file. In this case, uuenview does not have any control over the headers. If you include Base64 output into your messages, they are not MIME-compliant! If you rename, copy or link the program to uuencode, it may act as a smart replacement for the standard, accepting the same command-line syntax. This has not been well-tested yet. EXAMPLES
uuenview -m 'root,fred@somewhere.com' uudeview.tgz Encodes the file uudeview.tgz and mails it to both your local system administrator and to your friend Fred at the Somewhere company. If you give more than one filename on the command line, each file is usually handled separately. A workaround is to send them all as attachment to a single (or empty) mail: uuenview -m root -b -a file1 file2 < /dev/null Creates an empty mail and attaches the two given files, encoded in Base64 format, and mails the result to your system administrator. SEE ALSO
uudeview(1), uuencode(1), uudecode(1), sendmail(8), inews(1). The uudeview homepage on the Web, http://www.fpx.de/fp/Software/UUDeview/ BUGS
The program does not detect error conditions when mailing or posting. Attaching only works reliably if certain headers of the input message (for example Content-Type) are not folded and shorter than 1024 char- acters. It is not possible to encode into BinHex. The program will quite likely fail to handle binary data as input for plain text or quoted-printable attachments. On plain text attach- ments, the line length (must be less than 998 characters according to MIME) is not enforced. It is not possible to set the "charset" value of plain text attachments. It is not possible to set the content type value of attachments. sendmail(8) stops reading upon a line consisting only of a single dot. uudeview does not check plain text input files against this condi- tion. (The problem is worked around when using quoted-printable, and does not exist with the other encodings.) June 2001 UUENVIEW(1)
All times are GMT -4. The time now is 09:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy