On Wed, 14 Jul 2004, Stuart Miller wrote: > I wish to send an e-mail once a day containing a file generated by a > perl script I have written. I can generate the message with kmail -s > ..... -msg ..... but then I end up in the composer window. How can I > go the next step and have kmail actually send the message? Then I could > get a simple shell script to generate the file and send it to me (and > others) each morning. Hi Stuart, Once the composer is there you can probably use DCOP to close the composer window and send the message; since your script is apparently running somewhere where you have a DISPLAY and can start KMail anyway, you might do the following: > Alternate solution would be to generate the entire message with perl, > then drop it somewhere that kmail can find it. Problem is, as I > understand the docs, I would have to force kmail to regenerate the > indexes, and I do not see a command line option to do this. Can I access > the indexes with perl and modify them myself? There is also the issue of > setting the mesage id correctly. 1) Start kmail unconditionally 2) Sleep 5 to let it get on with starting up 3) Generate the whole message with perl 4) Use DCOP to add the whole message to the outbox 5) Use DCOP to trigger a mail send 6) Use DCOP to quit kmail More subtle is of course to make (1) and (6) conditional on KMail already running (ie. don't start it if already running, don't quit if it was already running). -- Adriaan de Groot adridg@cs.kun.nl Kamer A6020 024-3652272 GPG Key Fingerprint 934E 31AA 80A7 723F 54F9 50ED 76AC EE01 FEA2 A3FE http://www.cs.kun.nl/~adridg/research/ _______________________________________________ KDE PIM users mailing list kdepim-users@kde.org https://mail.kde.org/mailman/listinfo/kdepim-users