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
sendmail(4)							   File Formats 						       sendmail(4)

NAME
sendmail, sendmail.cf, submit.cf - sendmail configuration files SYNOPSIS
/etc/mail/sendmail.cf /etc/mail/submit.cf DESCRIPTION
The sendmail.cf and submit.cf files are the configuration files for sendmail(1M). Starting with version 8.12 of sendmail, which was shipped with version 9 of the Solaris operating system, two configuration files are used for submission and transmission of mail, instead of only sendmail.cf, as before. These are: sendmail.cf Remains the principal sendmail configuration file. Used for the Mail Transmission Agent (MTA). submit.cf Used for the Mail Submission Program (MSP). The MSP is used to submit mail messages. Unlike the MTA, it does not run as an SMTP daemon. The MSP does not require root privileges, thus the two-file model provides better security than the pre-sendmail 8.12 model, in which the MSP ran as a daemon and required root privileges. In the default sendmail configuration, sendmail uses submit.cf, as indicated in ps(1) output. In ps output, you will observe two sendmail invocations, such as the ones below: /usr/lib/sendmail -Ac -q15m /usr/lib/sendmail -bd -q15m The first indicates the use of submit.cf, with the client queue (/var/spool/clientmqueue) being checked--and, if needed, flushed--every 15 minutes. The second invocation runs sendmail as a daemon, waiting for incoming SMTP connections. As shipped, sendmail.cf and, in particular, submit.cf, are appropriate for most environments. Where a knowledgeable system administrator needs to make a change, he should use the following procedures. For sendmail.cf: 1. Change directories to the directory that contains the source files for the configuration files. # cd /etc/mail/cf/cf 2. Create a copy of the sendmail file for your system. # cp sendmail.mc `hostname`.mc 3. Edit `hostname`.mc. Make changes suitable for your system and environment. 4. Run make to generate the configuration file. # /usr/bin/make `hostname`.cf 5. Copy the newly generated file to its correct location. # cp `hostname`.cf /etc/mail/sendmail.cf 6. Restart the sendmail service. # svcadm restart sendmail You must restart sendmail for sendmail.cf file changes to take effect, as indicated in step 6. Steps 4 - 6 can be automated. See Automated Rebuilding of Configuration Files below. For submit.cf: 1. Change directories to the directory that contains the source files for the configuration files. # cd /etc/mail/cf/cf 2. Create a copy of the submit file for your system. # cp submit.mc submit-`hostname`.mc 3. Edit submit-`hostname`.mc. Make changes suitable for your system and environment. 4. Run make to generate the configuration file. # /usr/bin/make submit-`hostname`.cf 5. Copy the newly generated file to its correct location. # cp submit-`hostname`.cf /etc/mail/submit.cf You do not need to restart sendmail for changes to submit.cf to take effect. Steps 4 and 5 can be automated. See Automated Rebuilding of Configuration Files below. Enabling Access to Remote Clients The sendmail(1M) man page describes how the config/local_only property can be set to true or false to disallow or allow, respectively, access to remote clients for unmodified systems. Setting values for the following properties for the service instance svc:/network/smtp:sendmail results in automated (re)building of con- figuration files: path_to_sendmail_mc path_to_submit_mc The values for these properties should be strings which represent the path name of the .mc files referred to in steps 2 and 3 of both pro- cedures above. Recommended values are: /etc/mail/cf/cf/`hostname`.mc /etc/mail/cf/cf/submit-`hostname`.mc Each property, if set, results in the corresponding .mc file being used to (re)build the matching .cf file when the service is started. These properties persist across upgrades and patches. To prevent a patch or upgrade from clobbering your .cf file, or renaming it to .cf.old, you can set the desired properties instead. FILES
/etc/mail/cf/README Describes sendmail configuration files. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsndmr | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ SEE ALSO
make(1S), ps(1), sendmail(1M), svcadm(1M), attributes(5) System Administration Guide: Network Services SunOS 5.11 8 May 2008 sendmail(4)
All times are GMT -4. The time now is 05:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy