LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   call mail program like blat from java to send attachments (https://www.linuxquestions.org/questions/linux-software-2/call-mail-program-like-blat-from-java-to-send-attachments-243044/)

naijaguy 10-15-2004 12:27 PM

call mail program like blat from java to send attachments
 
In Java on Windows, I would exec a process to call the free Windows blat program (command line mail utility). I know there are a million mail programs in *nix...sendmail is one, mailto is another...but I don't know much about these.

The main thing is that this is ALL I need to be able to do. From Java, I want to reuse my basic code to call a command line utility to send an email attachment. I do have simple Java code that opens a connection to a URL that happens to be an email address, and with that I can send myself emails, but in this particular case I need to be able to attach files, because some of the text happens to be delimited, and as you know, it gets kind of messed up in emails, so I need to attach the log file to the email to preserve everything properly.

I would rather not have to learn to set up a bigtime email program that involves some system administration and all that--otherwise, I'd have set up JavaMail by now. Isn't there something simple in Linux that can allow me to do this? I paged through the man pages on mail and sendmail, but they don't seem to be able to do attachments. I'm also wondering if they have to be used interactively.

Thanks...I've been using Google, but no luck so far, especially with all the stuff out there on sendmail that's way overkill for my needs!

billymac00 05-04-2008 09:09 PM

Blat from Java
 
well, realize orig thread is stale but I have the same need. I can get all I need with Blat incl attachment via a command line. Just need to know how to associate that "command line" to the button action ...I am very green ...


All times are GMT -5. The time now is 06:28 PM.