What is the easiest, most portable way to send an email to elisp?

I would like to write a small emacs command to send email. What is the easiest way to do this? I know there are many email plugins for emacs, but I just need to send a simple, small email address.

+3
source share
2 answers

This works well:

(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 uses the Gnus messaging system (as opposed to slightly simpler mail), but it works in Emacs w / out any configuration on my system.

+6
source

C-x m simple enough.

+2
source

Source: https://habr.com/ru/post/1726087/


All Articles