Sponsored Content
Full Discussion: sending files as attachments
Top Forums UNIX for Beginners Questions & Answers Answers to Frequently Asked Questions How do I send email? sending files as attachments Post 1973 by pete on Tuesday 10th of April 2001 01:09:19 PM
Old 04-10-2001
Error Mail attachments from unix

I have to translate a microfocus COBOL--generated ascii report file into pdf and attach it in an e-mail kicked off from within the following cgi script:
if [ "$EMAIL" = "Y" ]; then
sed -e '/^H_/s///g' <$REPFILE >$REPFILE2

print "


Emailing to $EMAILID

"
(
echo "To: $EMAILID"
echo "Subject: OK - Drawing $DRWID Issue $DRWISS Certified White Report
Content-Type: multipart/mixed;
boundary=\"------------F31625F689894DCE7A7A828F\"

This is a multi-part message in MIME format.
--------------F31625F689894DCE7A7A828F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit"

echo "
White Report from Certified Data included within:
Drawing ID = $DRWID
Issue = $DRWISS
ChgAnal = $CHG"
if [ "$CHG" = "Y" ]; then
echo "ChgAnalIss = $CHGISS"
fi
echo "Manuf Doc = $MFG"
echo "--------------F31625F689894DCE7A7A828F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
"
cat $REPFILE2
echo "--------------F31625F689894DCE7A7A828F--"
) | mailx -t
------------------------------------------------------------
I can use postprint to go from ascii--->ps, and then I can use Acrobat's distill to convert the ps--->pdf, but how do I then attach the resulting pdf in an e-mail?
I've read all the threads here and I don't see an answer.
Please help. What am I missing? There is no option to mailx to attach, and the RFC822 was no help. We have to use mailx.
Thank you.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sending files as attachments

How do I send a file as an attachment on a Unix system (9 Replies)
Discussion started by: SmartJuniorUnix
9 Replies

2. UNIX for Advanced & Expert Users

sending attachments via unix

Hi, I need to send a mail attachment from the UNIX commandline. I'm using Tru64 and the mail client thats supposed receive the attached file (an excel sheet) is Lotus Notes. Can anybody help me out? (6 Replies)
Discussion started by: Abhishek Ghose
6 Replies

3. UNIX for Dummies Questions & Answers

sending attachments in mail

Hi , i have tried the following command to send an email with an attachment its working fine but i am getting mail with the embeded content inside the mail that too truncated. i wanted it as an attachment. /usr/lib/sendmail -F "MAC SIA" address "rajendra@abc.com.sg" -t <... (6 Replies)
Discussion started by: rajendragora
6 Replies

4. Shell Programming and Scripting

Sending text files as attachments

Hi, I have used the following command to send a text file "archiver.log" as attachment. (cat mail.log; uuencode archiver.log archiver.log; ) | mailx -s "Failure" asd@a.com : But in the mail i am not getting new lines in the text file.New Lines are getting replaced with some weird... (2 Replies)
Discussion started by: radhika03
2 Replies

5. Shell Programming and Scripting

Sending multiple attachments

Hi people, I am new to this forums. I have a quick question I hope one of you could help me with. I am writing a script to send attachments via email. However I am having trouble when trying to send multiple attachments. Here is the code I am using: send_mail() { uuencode $TMP $TMP1 > $TMP1... (1 Reply)
Discussion started by: deo2k8
1 Replies

6. UNIX for Dummies Questions & Answers

Sending email attachments

Hello, I've search the forum, but I cannot find an answer to my specific question. I'm trying to send some files to my professor. Upon his request, I used the following: tar -cvf vh.tar vh_part1.c vh_part2.c vh_part3.c vh_part4.c vh_sample_run15.txt uuencode vh.tar vh.tar > proj1 mail... (2 Replies)
Discussion started by: venush
2 Replies

7. HP-UX

Sending Unix files as attachments in an email

Hi, I am executing the following command in order to send a file as an attachment: mailx -s "Subject" emailID@xyz.com < Testfile.txt Instead of attaching the file Testfile.txt, it is writing the contents of the file in the email message body. Please advise on how I can send the file as an... (7 Replies)
Discussion started by: sangharsh
7 Replies

8. Shell Programming and Scripting

Sending Multiple Attachments using MAILX

I have created a shell scripts and wanted to email users multiple attachments using mailx. I noticed that when I do a man on mailx I see and -a option for attachments. When I run a: mailx -s "test attachments" -a include_file -a exclude_file testuser@mydomain.com (Interrupt -- one more to... (1 Reply)
Discussion started by: metallica1973
1 Replies

9. UNIX for Dummies Questions & Answers

Sending attachments via unix

OS Linux....Just curious as to why this is not working... uuencode test.txt "test.xls"|mailx -r xxx@server.com -s "validation report" emailrecipient1,emailrecipient2 Please help....Any other options do we need to use?? (3 Replies)
Discussion started by: saggiboy10
3 Replies

10. Shell Programming and Scripting

Sending an email with a body and attachments using uuencode

Hi, Im having a bit of an issue with using the uuencode command and sending out an email. My aim is to send an email out which has a body and also have attachments. Currently I can either get one or the other and not both on the same email. uuencode... (4 Replies)
Discussion started by: 02JayJay02
4 Replies
Mojo::Content::Single(3pm)				User Contributed Perl Documentation				Mojo::Content::Single(3pm)

NAME
Mojo::Content::Single - HTTP 1.1 content container SYNOPSIS
use Mojo::Content::Single; my $single = Mojo::Content::Single->new; $single->parse("Content-Length: 12 Hello World!"); DESCRIPTION
Mojo::Content::Single is a container for HTTP 1.1 content as described in RFC 2616. EVENTS
Mojo::Content::Single inherits all events from Mojo::Content and can emit the following new ones. "upgrade" $single->on(upgrade => sub { my ($single, $multi) = @_; ... }); Emitted when content gets upgraded to a Mojo::Content::MultiPart object. $single->on(upgrade => sub { my ($single, $multi) = @_; return unless $multi->headers->content_type =~ /multipart/([^;]+)/i; say "Multipart: $1"; }); ATTRIBUTES
Mojo::Content::Single inherits all attributes from Mojo::Content and implements the following new ones. "asset" my $asset = $single->asset; $single = $single->asset(Mojo::Asset::Memory->new); The actual content, defaults to a Mojo::Asset::Memory object with "auto_upgrade" enabled. "auto_upgrade" my $upgrade = $single->auto_upgrade; $single = $single->auto_upgrade(0); Try to detect multipart content and automatically upgrade to a Mojo::Content::MultiPart object, defaults to 1. METHODS
Mojo::Content::Single inherits all methods from Mojo::Content and implements the following new ones. "new" my $single = Mojo::Content::Single->new; Construct a new Mojo::Content::Single object and subscribe to "read" event with default content parser. "body_contains" my $success = $single->body_contains('1234567'); Check if content contains a specific string. "body_size" my $size = $single->body_size; Content size in bytes. "clone" my $clone = $single->clone; Clone content if possible, otherwise return "undef". "get_body_chunk" my $chunk = $single->get_body_chunk(0); Get a chunk of content starting from a specfic position. "parse" $single = $single->parse("Content-Length: 12 Hello World!"); my $multi = $single->parse("Content-Type: multipart/form-data "); Parse content chunk and upgrade to Mojo::Content::MultiPart object if possible. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::Content::Single(3pm)
All times are GMT -4. The time now is 03:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy