有没有办法从区域或缓冲区构建电子邮件消息,设置收件人然后以 elisp 代码发送消息?
我已将 emacs 配置为通过我的 gmail account 发送邮件我希望能够从 elisp 程序给自己发送电子邮件。使用的命令是message-mail。
最佳答案
这是消息邮件的包装器,提示您输入“收件人”和“主题”行:
(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)))
关于email - 在 Emacs 程序中发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/679275/