Sponsored Content
Top Forums Shell Programming and Scripting Email with jpg picture embedded - inline Post 302908369 by clx on Monday 7th of July 2014 10:23:05 AM
Old 07-07-2014
May be you can change your original version as


Code:
sendmail -t <<EOT
TO: "$@"
FROM: ABC.FROM@abc.com
SUBJECT: Embed image test
MIME-Version: 1.0
Content-Type: multipart/related;boundary="XYZ"
--XYZ
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#ffffff" text="#000000">
<img src="cid:part1.06090408.01060107" alt="">
My HTML Text Here
Bye
</body>
</html>
--XYZ
Content-Type: image/jpeg;name="banner.jpg"
Content-Transfer-Encoding: base64
Content-ID: <part1.06090408.01060107>
Content-Disposition: inline; filename="banner.jpg"
$(base64 banner.jpg)
--XYZ--
EOT


And call it as

Code:
$SCRIPTDIR/original.sh $(tr '\n' ' ' < $file)

Or, you can pass the recipients file as the command line
Code:
sendmail -t <<EOT
TO: $(tr '\n' ' ' < $1)
..
..
EOT

And call it as

Code:
$SCRIPTDIR/original.sh $file


Last edited by clx; 07-07-2014 at 11:33 AM..
 

7 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

picture

How i do i post a picture below my name as some of u have???? Is there a rule like only those who are moderators, administrators only can have a picture below their names??? If not, then kindly tell me how to post a picture below my name?? Thanks, Nisha :rolleyes: (44 Replies)
Discussion started by: Nisha
44 Replies

2. Shell Programming and Scripting

PHP: display text and picture

Can someone give me a script in php to: Connect to Mysql: DB= content TABLE = message Enter text , about 3000 characters, and put a image either left or right, top or bottom or the text. Please someone make me this script, ive spent several hours trying to figure it out. (1 Reply)
Discussion started by: perleo
1 Replies

3. UNIX for Dummies Questions & Answers

Changing picture at banner?

On my Ultra 60, when booting and at the banner screen, on the top left is a picture of a globe. On another machine (Ultra 60) its a picture of a Sun. Is this something on the graphics card, or is this picture located somewhere else and able to be changed? (0 Replies)
Discussion started by: ridgeback00
0 Replies

4. Shell Programming and Scripting

Rename all ".JPG" files to ".jpg" under all subfolders...

Hi, Dear all: One question ! ^_^ I'm using bash under Ubuntu 9.10. My question is not to rename all ".JPG" files to ".jpg" in a single folder, but to rename all ".JPG" files to ".jpg" in all subfolders. To rename all ".JPG" to ".jpg" in a single folder, for x in *.JPG; do mv "$x"... (7 Replies)
Discussion started by: jiapei100
7 Replies

5. UNIX for Dummies Questions & Answers

Need help! How to gnuplot a picture??

I would like to ask if I have already plot a graph using gnuplot, the setting(made by others) is in "gnuplot.defaults": gnuplot> load '<ParadisDir>/inputs/gnuplot.defaults' gnuplot> splot 'box.in' with lines, '0t0001' w lines How to transform it to bmp file? (or other types of pictures?) ... (2 Replies)
Discussion started by: kelvin490
2 Replies

6. Programming

Download http picture using C++

Dear all, I am working on writing the script which can read a file (having the html path for some pictures) and download those picture in the given local directory. Please find my iniatitve here, however I am still not able to figure out the 'download' command. Any help is appreciated. ... (1 Reply)
Discussion started by: emily
1 Replies

7. UNIX for Beginners Questions & Answers

Create movie from jpg (or other picture format) file

hi linux expert is there any program for create movie file from pictures file (like jpg)? Many Thanks samad (1 Reply)
Discussion started by: abdossamad2003
1 Replies
MPICTURES(6)							   Games Manual 						      MPICTURES(6)

NAME
mpictures - picture inclusion macros SYNOPSIS
troff -mpictures [ options ] file ... DESCRIPTION
Mpictures macros insert PostScript pictures into troff(1) documents. The macros are: .BP source height width position offset flags label Define a frame and place a picture in it. Null arguments, represented by "", are interpreted as defaults. The arguments are: source Name of a PostScript picture file, optionally suffixed with (n) to select page number n from the file (first page by default). height Vertical size of the frame, default 3.0i. width Horizontal size of the frame, current line length by default. position (default), or to left-justify, center, or right-justify the frame. offset Move the frame horizontally from the original position by this amount, default 0i. flags One or more of: ad Rotate the picture clockwise d degrees, default d=90. o Outline the picture with a box. s Freely scale both picture dimensions. w White out the area to be occupied by the picture. l,r,t,b Attach the picture to the left right, top, or bottom of the frame. label Place label at distance 1.5v below the frame. If there's room, .BP fills text around the frame. Everything destined for either side of the frame goes into a diversion to be retrieved when the accumulated text sweeps past the trap set by .BP or when the diversion is explicitly closed by .EP. .PI source height,width,yoffset,xoffset flags. This low-level macro, used by .BP, can help do more complex things. The two arguments not already described are: xoffset Offset the frame from the left margin by this amount, default 0i. yoffset Offset the frame from the current baseline, measuring positive downward, default 0i. .EP End a picture started by .BP; .EP is usually called implicitly by a trap at frame bottom. If a PostScript file lacks page-delimiting comments, the entire file is included. If no %%BoundingBox comment is present, the picture is assumed to fill an 8.5x11-inch page. Nothing prevents the picture from being placed off the page. SEE ALSO
troff(1) DIAGNOSTICS
A picture file that can't be read by the PostScript postprocessor is replaced by white space. BUGS
A picture and associated text silently disappear if a diversion trap set by .BP isn't reached. Call .EP at the end of the document to retrieve it. Macros in other packages may break the adjustments made to the line length and indent when text is being placed around a picture. A missing or improper %%BoundingBox comment may cause the frame to be filled incorrectly. MPICTURES(6)
All times are GMT -4. The time now is 05:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy