Bug 72037 - command line send mail option
Summary: command line send mail option
Status: RESOLVED INTENTIONAL
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-07 07:20 UTC by Jon Payne
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Payne 2004-01-07 07:20:33 UTC
Version:            (using KDE KDE 3.1.3)
Installed from:    Mandrake RPMs
OS:          Linux

I have a need to use kmail to automatically send a mail message from the command line (which I will wrap in a cron script). It ALMOST does this from the command line by invoking;

kmail me@yahoo.com -s "subject of message" --msg <file name> 

However, this brings up the composer window, completely filled in and one must click send or press ctrl ret to send the message, so it can not be automated.

Another command line option is needed to force the send without bringing up the composer window.
Command line options already used are;
-s - subject
-c - carbon copy name
-b - bcc name
--body - body text
--help - help
Comment 1 Andreas Gungl 2004-01-07 09:22:20 UTC
Subject: Re:  New: command line send mail option

Am Wednesday 07 January 2004 07:20 schrieb Jon Payne:
> I have a need to use kmail to automatically send a mail message from the
> command line (which I will wrap in a cron script). It ALMOST does this
> from the command line by invoking;
>
> kmail me@yahoo.com -s "subject of message" --msg <file name>

Why do you need KMail to automate sending of mails? If you use the command 
line anyway then you can use a command line tool too. Try "man mail", this 
should give you what you want.

> However, this brings up the composer window, completely filled in and one
> must click send or press ctrl ret to send the message, so it can not be
> automated.
>
> Another command line option is needed to force the send without bringing
> up the composer window. Command line options already used are;
> -s - subject
> -c - carbon copy name
> -b - bcc name
> --body - body text
> --help - help

This could get implemented, but it's certainly low on priority.

Comment 2 Richard Bos 2004-01-07 10:42:30 UTC
 > Another command line option is needed to force the send without bringing 
 > up the composer window. Command line options already used are; 
 > -s - subject 
 > -c - carbon copy name 
 > -b - bcc name 

This can be achieved with the command line mail command as well,;
use 'mail -~'
-~     Enable tilde escapes even  if  not  in  interactive mode.

include ~r ~t and ~t in your file to be send and that's it.
Comment 3 Jon Payne 2004-01-07 14:11:24 UTC
Thank you for the comments. I use kmail because it is already set up on my machine, and I use it daily for normal email. I have tried to set up mail but find the setup rather cryptic. Kmail is nice and simple. Question, why are the other command line switches even included? Is not an auto send just a logical conclusion of the exisiting functions. They seem quite useless otherwise.

Best Regards
Jon Payne, Atlanta USA
Comment 4 Thiago Macieira 2004-01-07 15:25:45 UTC
There are existing programs that send mail automatically, apart from "mail". There is formail and sendmail itself can do it. Frankly, I find them easier (and much faster, that's to be sure) than kmail.

One other thing: kmail is an X program, which requires in turn an X server running, as well as the DCOP server. Those other programs don't, but they require a running MTA.
Comment 5 Ingo Klöcker 2004-01-08 18:45:53 UTC
What you want to do can be achieved with a few DCOP commands. Use kdcop to find out which DCOP commands KMail offers. You can then use the command line program 'dcop' to send DCOP commands to KMail.

Feel free to contact kdepim-users@kde.org for help.