tags:

views:

55

answers:

1

I need to automatically send an email from within an elisp function. Hypothetically, I would like a single function which I can pass in the to, from, subject, body, and possibly other headers. Does such a function exist? If not how could it be implemented?

+5  A: 

This snippet will send a mail in Emacs:

(progn
    (mail) 
    (mail-to) (insert "[email protected]")
    (mail-subject) (insert "the subject")
    (mail-text) (insert "body of mail")
    (mail-send))

Hope this helps.

pokita
Exactly what I was looking for. Thanks for your help!
Mark Roddy