Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> Emailing files from the cmdline, ...as attachments and as the body
fishsponge
Posted: Jul 24 2003, 03:56 PM
Quote Post


Administrator
********

Group: Admin
Posts: 679
Member No.: 1
Joined: 13-February 03



Here's how to send a file as the body of an email (works best with ASCII files :D):
CODE
bash-2.05$ mailx -s "Email Test" username@domain.com < /tmp/file.txt

Here's how to send a file as an attachment to an email on the cmdline:
CODE
bash-2.05$ export UUE=/tmp/file.txt
bash-2.05$ uuencode ${UUE} < ${UUE} | mailx -s "${UUE}" username@domain.com

:D
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
arwen_elanor
Posted: Aug 16 2004, 06:31 AM
Quote Post


Newbie
*

Group: Members
Posts: 4
Member No.: 449
Joined: 16-August 04



Hallo,

I have used your command for sending attachments. My problem is, that this command doesn´t work if the size of the file is 21 MB or more.
Is there anything I could do that this file is also be send?

Thanks for helping!
arwen_elanor
PMEmail Poster
Top
fishsponge
Posted: Aug 16 2004, 01:11 PM
Quote Post


Administrator
********

Group: Admin
Posts: 679
Member No.: 1
Joined: 13-February 03



21MB doesn't seem to be a power of 2, and therefore i think it's something wrong with your configuration, not the command itself.

what errors do you receive?
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
arwen_elanor
Posted: Aug 17 2004, 07:51 PM
Quote Post


Newbie
*

Group: Members
Posts: 4
Member No.: 449
Joined: 16-August 04



Hallo,

it seems that these emails are sent about another server and there the configuration doesn´t allows attachments greater 20 MB.
I think I ´ve to compress the files.
But thanks a lot!

Nice Evening,
arwen_elanor
PMEmail Poster
Top
arwen_elanor
Posted: Aug 19 2004, 11:21 AM
Quote Post


Newbie
*

Group: Members
Posts: 4
Member No.: 449
Joined: 16-August 04



Hi,

now there is another problem. I´ve to test my script on another server and I'm getting the following error message:

uuencode: ISO8859-15 to 646 conversion: Invalid argument

But I've nothing changed except the directory. What is wrong?

PMEmail Poster
Top
Perderabo
Posted: Aug 19 2004, 12:09 PM
Quote Post


User Level: 4
****

Group: Members
Posts: 76
Member No.: 349
Joined: 28-June 04



QUOTE (arwen_elanor @ Aug 19 2004, 11:21 AM)
Hi,

now there is another problem. I´ve to test my script on another server and I'm getting the following error message:

uuencode: ISO8859-15 to 646 conversion: Invalid argument

But I've nothing changed except the directory. What is wrong?

Note the comment "works best with ascii files" in the original post. There was sort of a joke. The real statement is "will only work with ascii files". And ascii means "american standard code for information interchange". We Americans do not have diacritical marks. (Not too many of us even know what a diacritical mark is. :wacko: ) The uuencode protocol can only handle a limited character set as input. Once you introduce stuff like the German umlaut, you have moved beyond what uuencode can do. So it's not the directory, it's the input data.
PMEmail Poster
Top
arwen_elanor
Posted: Aug 20 2004, 12:02 PM
Quote Post


Newbie
*

Group: Members
Posts: 4
Member No.: 449
Joined: 16-August 04



Is there any other possibility to send the file as attachment? Or another decode-function?
PMEmail Poster
Top
fishsponge
Posted: Aug 20 2004, 02:23 PM
Quote Post


Administrator
********

Group: Admin
Posts: 679
Member No.: 1
Joined: 13-February 03



you can send the file as an attachment using the first post again... see the bit called "Here's how to send a file as an attachment to an email on the cmdline"...
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
Perderabo
Posted: Aug 20 2004, 04:17 PM
Quote Post


User Level: 4
****

Group: Members
Posts: 76
Member No.: 349
Joined: 28-June 04



QUOTE (fishsponge @ Aug 20 2004, 02:23 PM)
you can send the file as an attachment using the first post again... see the bit called "Here's how to send a file as an attachment to an email on the cmdline"...

But that requires uuencode which is not working for him. He could use the first part of the post and send it as a body though.
PMEmail Poster
Top
fishsponge
Posted: Aug 24 2004, 08:25 AM
Quote Post


Administrator
********

Group: Admin
Posts: 679
Member No.: 1
Joined: 13-February 03



oh yeah... oops, lol
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Tutorials & How-To's | Next Newest »

Topic Options Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.0803 ]   [ 12 queries used ]   [ GZIP Enabled ]




Partners: Cambridge Plus :: <Link Available> :: SolidWorks 3D CAD :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum