Sponsored Content
Top Forums Shell Programming and Scripting Attach a binary file to email in a script Post 302384432 by jgt on Tuesday 5th of January 2010 10:02:03 AM
Old 01-05-2010
You should convert the file to mime format with b64encod(e), and I think that you need a blank line after the "Content-Transfer-Encoding" line.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to attach a file & send mail thru script

In shell script how can I attach a file and send a mail. suppose if I written like the following way usr/bin/mail 'subject" "mail_id" < file. a mail goes to the mail-id with the content of file.But I want the file to be atttached to the mail.How can I get it.is there any way for this. ... (9 Replies)
Discussion started by: Mar1006
9 Replies

2. Shell Programming and Scripting

hi.. how to attach a tar file using shell script

Hi, How to attach a tar file using shell script or the command liine.. I following command just send the mail to the person with .txt file as body, I want to send it as attachment. /usr/sbin/sendmail -f "user1@daemon.com" user2@daemon.com <hi.txt The contents of the hi.txt will be... (1 Reply)
Discussion started by: madhumathikv
1 Replies

3. UNIX for Dummies Questions & Answers

How to use "mail" to attach a file with an email?

echo "content" | mail email@address -s subject Where to attach a file with the email? (2 Replies)
Discussion started by: meili100
2 Replies

4. Shell Programming and Scripting

attach multiple files in email

I am trying to send multiple files as attachment in one email, I tried to search but couldn't find. Please let me know if any solutions. (2 Replies)
Discussion started by: mgirinath
2 Replies

5. Shell Programming and Scripting

attach multiple file in an email

Hello I have to attach multiple file as an email attachment. here is what i my understanding so far: 1. search in a certain directory that is there any specific file say for example .xml file exist or not 2. if exist then take those file name from the folder and attach it to another text... (1 Reply)
Discussion started by: osrukarigor
1 Replies

6. UNIX for Dummies Questions & Answers

How to attach a file in a email

Anyone can help me, in Unix, how can I attach a file in the email? Thank (3 Replies)
Discussion started by: ting123
3 Replies

7. Shell Programming and Scripting

Not able to attach text in body of email while sending mail with attachment

Hi, We have been trying to send mail with attachment and it is going fine, but when we try to attach a text to the body of the email, we find that the mail is going fine with the body text but the attachment is not going through. We are using ksh. The command that is successfull without the... (6 Replies)
Discussion started by: jmathew99
6 Replies

8. Shell Programming and Scripting

Script to attach file to mail

Hello, I have a .dat file containing one line. I need a script to read that line and make it part of the body and send a mail... Let's say the line is $line. I need the script to send a mail with the body "The last disposal feed is $line". Thanks (4 Replies)
Discussion started by: sfetea
4 Replies

9. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

10. UNIX for Beginners Questions & Answers

Check Error File attach and email zip file

I need something to say if these two file extensions exist in this directory *err and *rpt zip up these files into one zip file and email them to me. If they don't exist wait 2 hours and check again.... Not sure how to determine if I need to do an if then statement or a while true or a for... (1 Reply)
Discussion started by: xgringo
1 Replies
INN.CONF(5)							File Formats Manual						       INN.CONF(5)

NAME
inn.conf - configuration data for InterNetNews programs DESCRIPTION
The file /etc/news/inn.conf is used to determine various parameters. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines specify parameters that may be read, and should be of the following form: name : [optional whitespace] value Everything after the whitespace and up to the end of the line is taken as the value; multi-word values should not be put in quotes. The case of names is significant -- server is not the same as Server or SERVER. Some parameters specified in the file may be overridden by environment variables, and some file parameters may be used to mask real data, such as when hiding a cluster of hosts behind a single electronic mail hostname. The current set of parameters is as follows: fromhost This is the name of the host to use when building the From header line. The default is the fully-qualified domain name of the local host. The value of the FROMHOST environment variable, if it exists, overrides this. moderatormailer This names the default machine that contains forwarding aliases for all moderated groups. It is only used if the moderators(5) file doesn't exist, or if the group is not matched by that file. The value is interpreted as a pattern match; see moderators(5). organization This specifies what to put in the Organization header if it is blank. The value of the ORGANIZATION environment variable, if it exists, overrides this. pathhost This specifies how to name the local site when building the Path header line. The default is the fully-qualified domain name of the local host. server This specifies the name of the NNTP server to which an article should be posted. The value of the NNTPSERVER environment variable, if it exists, overrides this. domain This should be the domain name of the local host. It should not have a leading period, and it should not be a full host address. It is used only if the GetFQDN routine in libinn(3) cannot get the fully-qualified domain name by using either the gethostname(2) or gethostbyname(3) calls. The check is very simple; if either routine returns a name with a period in it, then it is assumed to have the full domain name. nntpport This is the TCP port INN is accepting connections on. This can be changed, for example if you want to run in.nnrpd from inetd on port 119. The default value is ``119.'' useactived When this parameter is enabled (``yes''), nnrpd will try using the actived program. The default value is ``no''. The inewsport parameter is only used by inews when posting an article. Three parameters are used only by nnrpd when accepting postings from clients: mime-version If this parameter is present, then nnrpd will add the necessary MIME (Multipurpose Internet Mail Extensions) headers to all any articles that do not have a Mime-Version header. This parameter specifies the MIME version, and should normally be ``1.0''. mime-contenttype If MIME headers are being added, this parameter specifies the value of the Content-Type header. The default value is ``text/plain; charset=US-ASCII.'' mime-encoding If MIME headers are being added, this parameter specifies the value of the Content-Transfer-Encoding header. The default value is ``7bit.'' Note that this file can be identical on all machines in an organization. EXAMPLE
fromhost: foo.com moderatormailer: %s@uunet.uu.net organization: Foo, Incorporated #pathhost -- use FQDN. server: news.foo.com domain: foo.com This file is intended to be fairly static; any changes made to it are typically not reflected until a program restarts. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.16, dated 1996/09/06. SEE ALSO
libinn(3), moderators(5). INN.CONF(5)
All times are GMT -4. The time now is 01:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy