Programmatically send email from elisp function

I need to automatically send an email from elisp function. Hypothetically, I need one function that I can pass to, from, subject, body, and possibly other headers. Is there such a function? If not, how can this be implemented?

+6
emacs elisp
source share
1 answer

This snippet will send mail to Emacs:

(progn (mail) (mail-to) (insert " recipient@nomail.invalid ") (mail-subject) (insert "the subject") (mail-text) (insert "body of mail") (mail-send)) 

Hope this helps.

+8
source share

All Articles