Sponsored Content
Top Forums UNIX for Advanced & Expert Users email attachment, with a message using mailx Post 7445 by edog on Wednesday 26th of September 2001 12:18:25 PM
Old 09-26-2001
email attachment, with a message using mailx

Hi, I am trying to include a message along with an attachment with an email using mailx on AIX.

uuencode Test.dat Test.dat| mailx -s 'Testing' mymail@yahoo.com < MESGFILE

This only gives me the contents of MESGFILE as my message.

If I remove the < FILE I recieve the attachment.

What I want is both the attachent and the message in MESGFILE.

I've checked out the FAQ and I would really like to use mailx so I don't have to wait a month to have my admin install any new tools. Any help/ideas would be appreciated.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Extract or save attachment of email using mailx

Hi, Could someone help me with 'Extract or save attachment of email using mailx' Thanks, Vijay ;) (1 Reply)
Discussion started by: kandati
1 Replies

2. Shell Programming and Scripting

Sending email with text & attachment using mailx

I spent some time working this out, with a little help from various forums, and thought the community would like to know : Here is how you can send an email from a single Unix command line : /usr/bin/echo "Email text\nNew line\nAnother new line" >x | uuencode sourcefile.txt sourcefile.txt |... (3 Replies)
Discussion started by: haryadoon
3 Replies

3. Shell Programming and Scripting

How to send attachment to web-based email client using mailx

hi, i am trying to send mail with attachment to web-based email client like gmail.com using mailx. the problem is it is displayed in content rather than as attachment. the code i am using is as follows, uuencode test1.txt test1.txt | mailx -s "test only" aaaa@gmail.com does anyone... (1 Reply)
Discussion started by: randomcz1
1 Replies

4. Shell Programming and Scripting

Problem while sending message and attachment with mailx

Hi All, I am trying to send a mail with an attachment and message. Following command I am using. (cat <messagefile> ; uuencode <attachmentfile> <attachmentfile>)|mailx -s"Subject" dave@email.com In the received mail, message body is appearing fine. But attachment is not coming. Rather... (2 Replies)
Discussion started by: nihar.dutta
2 Replies

5. Shell Programming and Scripting

Adding an attachment as an attachment to mailx

I don't want the attachment embedded in the mail. I would like a file attached. When I do mailx -s "Report, `date +'%D %r` " -r "Notifications" bob@bob.com < /usr/local/bin/myreport.log> /dev/null It gets embedded in my email. I want a file attachment. How do I do that? (2 Replies)
Discussion started by: guessingo
2 Replies

6. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

7. UNIX for Dummies Questions & Answers

Send email with attachment and body : mailx , waiting for input , signal Control D

Hi, I am trying to send email with attacment and body using "mailx" (cat body.txt; uuencode attach.txt) | mailx -s "Attachment" abc@xyz.com When i type this command, the shell is still waiting for me to enter something in standard input and press control D before it sends a mail and... (2 Replies)
Discussion started by: aliaszero
2 Replies

8. Shell Programming and Scripting

Mailx with attachment and message body

i have to attach the 'body in the email' along with attachment below code is throwing errors, how can i do it ? here body file contains message, it should display in email, please help i am using HP-UX (cat body ;) (uuencode attch1 attch1 ;) | mailx -m -s "testing" "abc@gmail.com" ... (4 Replies)
Discussion started by: only4satish
4 Replies

9. UNIX for Dummies Questions & Answers

Mimesender (Perderabo): no attachment in email message

Hello, all, I have been trying to use what Perderabo has given to send attachment via email., but I am not getting the attachments, what I see on the receiving email system are the attachments contents inside the body of the received email. No attachment icon shows in the received email. I am on... (3 Replies)
Discussion started by: gio001
3 Replies

10. Red Hat

Sending email with message body and attachment

Hello experts!! I am trying to send an email with message body and attachment.but i am getting any one like message body or attachment. I tried below command: (echo "subject:test";echo "MIME-Version: 1.0";echo "content-transfer-encoding:base 64";echo "content-type:txt;name=test.txt";cat... (2 Replies)
Discussion started by: Devipriya Ch
2 Replies
Test::POP3(3pm) 					User Contributed Perl Documentation					   Test::POP3(3pm)

NAME
Test::POP3 - Automate Email Delivery Tests SYNOPSIS
use Test::POP3; my $pop = Test::POP3->new({ host => $host, user => $user, pass => $pass, }); # this will delete all messages from the server ok($count == $pop->wait_for_email_count($count,$timeout),"got $count"); # find and delete a single email message which matches these rules # see Test::Email for more information $pop->ok({ # optional search parameters to => ($is or qr/is like/), from => ($is or qr/is like/), subject => ($is or qr/is like/), body => ($is or qr/is like/), headername => ($is or qr/is like/), }, "got message"); ok($pop->get_email_count() == $count, "$count emails in cache"); # get the Test::Email object my @email = $pop->get_email(); ok($pop->delete_all() == 2, "deleted 2 messages"); # tweak MIME::Parser settings my $parser = $pop->get_parser(); DESCRIPTION
Please note that this is ALPHA CODE. As such, the interface is likely to change. This module can help you to create automated tests of email delivered to a POP3 account. Messages retrieved from the server but not yet matched by a test will be cached until either that message is the first to pass a test, or is returned by "$pop3->get_email()". Messages returned are Test::Email objects. METHODS
"my $pop = Test::POP3->new($href);" The arguments passed in the href are host, user, and pass. "my $count = $pop->wait_for_email_count($count, $timeout_seconds?);" Calling this method will result in all messages being deleted from the server. This will wait up to $timeout seconds for there to be $count unprocessed messages found on the server. After $count or more messages are found, or after $timeout seconds, the current email count will be returned. $timeout_seconds defaults to 30. "my @email = $pop->get_email();" Get all of the email messages currently in local cache. You should call "$pop3->wait_for_email_count($count)" before calling this method if you think that there may be messages on the server yet to be retrieved. Calling this method will cause the local cache to be emptied. Email messages returned will be Test::Email objects. "my $count = $pop->get_email_count($check_server);" This will return the number of email messages in the cache. If $check_server is true, then the server will be checked once before the count is determined. If you would like to wait for messages to arrive on the server, and then be downloaded prior to counting, use "$pop3->wait_for_email_count()". "my $ok = $pop->ok($test_href, $description);" Calling this method will cause the email in the local cache to be tested, according to the contents of $test_href. The first email which passes all tests will be deleted from the local cache. Since this method only checks the local cache, you will want to call "$pop3->wait_for_email_count()" before calling this method. "ok" will produce TAP output, identical to "Test::Simple::ok" and "Test::More::ok". "my $parser = $pop->get_parser();" Test::POP3 uses MIME::Parser to process the messages. (MIME is not yet handled by "Test::Email", it will be soon.) Use this method if you want to manage the parser. EXPORT
None. SEE ALSO
Test::Builder, Test::Simple, Test::More, MIME::Parser AUTHOR
James Tolley, <james@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2007 by James Tolley This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. perl v5.10.0 2008-10-24 Test::POP3(3pm)
All times are GMT -4. The time now is 08:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy