views:

199

answers:

3

I regularly send files in Gmail to exchange files between different computers. It is cumbersome. I want quickly to send my files, such as error logs. I found a promising article [1] about Mutt, but it apparently is not what I want:

Please note that mutt is a pure MUA and cannot send e-mail without proper email server .

I want no email server, since I cannot install it to my clients' computers. I don't need to know the sender. I want quickly to send many error logs to my Gmail. I am looking something like:

mutt -s "Many error logs" -a ./log1 -a ./log2 -a ./log3 [email protected]

I would really love to do the job in terminal. It is too time-consuming to bulk-send files in Gmail. How can I quickly send a great amount of files?

[1] http://www.cyberciti.biz/tips/sending-mail-with-attachment.html

+1  A: 

Why are you using email for this? Other options:

  • FTP/SCP (run a server yourself, or purchase a hosted service)
  • Internet storage service like Dropbox.
Chase Seibert
A: 

assuming that you don't want to use ftp/scp as suggested above, here is how i solved a similar problem ... emailing logs from a client:

  1. i created a cgi script on my server that had the ability to mail things to myself. a sort of email proxy webservice.

  2. the client posted the files it needed to send (along with authentication, obviously) to that cgi script.

that way the client only needs to talk to my server instead of talking to a mail server.

perhaps this helps. -don

Don Dickinson
+2  A: 

Mutt can be configured to use a different MTA than the default sendmail. You could install SSMTP (described here and available for download here) or ESMTP and configure it to send directly to Gmail's web server, then configure Mutt to use SSMTP or ESMTP. This is nicely described in this Ubuntu tutorial. If installing systemwide binaries isn't an option, you ought to be able to install SSMTP or ESMTP to a local folder.

If you prefer scripting, mimesend, which is one of the example programs in Perl's MIME-tools package, does the same thing as your mutt command and could be hacked to connect to Gmail's web server.

Josh Kelley
I am totally flabbergasted. The Mime-things sound extremely interesting. Can you give some examples where you use them? You can customise your own programs with them. Interesting!
Masi
MIME-tools is a library that you can use in Perl code; for example, MIMEDefang, a virus/spam filter, uses them to parse mail messages.
Josh Kelley
mimesend is intended as an example of how to write code that uses MIME-tools, but I've found it to be very useful as a command-line tool on its own (similar to your mutt example, except entirely command-line driven; like mutt, it requires an MTA).
Josh Kelley
+ 1 for the excellent tip. I am totally newbie here. I have read some tutorial about Mimes. Thank you!
Masi