I'd like to write a little emacs command to send an email. What's the simplest way to do this? I know there are a lot of mail-sending plugins for emacs, but I really just need to send a simple little email.
That's true. But I was wanting to send it programmatically. It looks like compose-mail will bring up a new frame to compose the mail in.
Jason Baker
2009-12-18 19:31:01
+5
A:
This works nicely:
(defun try-send-email (to subject body)
"simple wrapper around message to send an email"
(message-mail to subject)
(message-goto-body)
(insert body)
(message-send-and-exit))
It does use Gnus' message system (as opposed to the slightly simpler mail), but it does work in an Emacs w/out any configuration on my system.
Trey Jackson
2009-12-18 19:38:58