有没有办法从区域或缓冲区建立电子邮件,设置收件人,然后用elisp代码发送邮件?
我已经配置emacs通过我的Gmail帐户发送邮件,我希望能够从elisp程序发送自己的电子邮件.使用的命令是邮件邮件.
这是邮件邮件的包装器,它会提示您输入"to"和"subject"行:
(defun my-message-mail-region (b e to subject) "Send the current region in an email" (interactive "r\nsRecipient: \nsSubject: ") (let ((orig-buffer (current-buffer))) (message-mail to subject) (message-goto-body) (insert (save-excursion (set-buffer orig-buffer) (buffer-substring-no-properties b e))) (message-send-and-exit)))