Wiki Ubuntu-it

Indice
Partecipa
FAQ
Wiki Blog
------------------
Ubuntu-it.org
Forum
Chiedi
Chat
Cerca
Planet
  • Immutable Page
  • Info
  • Attachments
  • attachment:inviare-email.txt of AmbienteGrafico/Gnome/ScriptNautilus

Attachment 'inviare-email.txt'

Download

   1   #!/usr/bin/perl -w
   2 
   3     # By John Russell
   4 
   5     # This script sends the selected file(s) with your email client.
   6 
   7     use strict;
   8 
   9     my $MAILTO_URL="mailto:?";
  10 
  11     my @files = split("\n", $ENV{NAUTILUS_SCRIPT_SELECTED_FILE_PATHS});
  12 
  13     my $count = 0;
  14 
  15     foreach my $file (@files)
  16 
  17     {
  18 
  19         if ( ! -f $file && ! -l $file )
  20 
  21         {
  22 
  23             my @dialog = ("gdialog","--title","Error","--msgbox", "\nError: Can not send $file.    \n\n    Only regular files can be mailed.    ","200", "300");
  24 
  25             system (@dialog);
  26 
  27         }
  28 
  29         else
  30 
  31         {
  32 
  33            $MAILTO_URL = $MAILTO_URL . "attach=" . $file . "&";
  34 
  35                shift;
  36 
  37             $count += 1;
  38 
  39         }
  40 
  41     }
  42 
  43     if ($count > 0)
  44 
  45     {
  46 
  47         my @command = ("gnome-open", $MAILTO_URL);
  48 
  49         system(@command);
  50 
  51     }

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (13/09/2007 09.40.02, 1.3 KB) [[attachment:aprire-terminale.txt]]
  • [get | view] (24/01/2008 13.42.40, 0.2 KB) [[attachment:bluetooth.txt]]
  • [get | view] (13/09/2007 09.36.08, 8.0 KB) [[attachment:conversione-file-audio.txt]]
  • [get | view] (24/01/2008 13.42.35, 0.1 KB) [[attachment:file-root.txt]]
  • [get | view] (24/01/2008 10.34.17, 0.8 KB) [[attachment:inviare-email.txt]]
  • [get | view] (24/01/2008 13.35.41, 1.2 KB) [[attachment:inviare-email2.txt]]
  • [get | view] (24/01/2008 10.36.34, 0.4 KB) [[attachment:montare-iso.txt]]
  • [get | view] (24/01/2008 13.38.57, 0.8 KB) [[attachment:mostranascondi-filenascosti.txt]]
  • [get | view] (24/01/2008 13.39.01, 0.4 KB) [[attachment:ricerca.txt]]
  • [get | view] (24/01/2008 13.39.08, 0.7 KB) [[attachment:ridimensiona-immagini.txt]]
  • [get | view] (24/01/2008 10.36.38, 0.2 KB) [[attachment:smontare-iso.txt]]
  • [get | view] (17/04/2008 11.01.21, 0.1 KB) [[attachment:sudo-gedit.txt]]
  • [get | view] (24/01/2008 13.39.15, 0.9 KB) [[attachment:sudo-nautilus.txt]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.