Setup for Gmail in Emacs VM

梦想的初衷 提交于 2019-12-23 11:39:09

问题


after using mutt as an email client for a while, I would like to try the VM package of GNU Emacs (if it is important: Ubuntu 11.04, 64bit) to read my mail. I "googled" the web if there is a configuration file available (modifications necessary in .emacs and the new .vm file) from which I can easily start my own customizations (I want to use my gmail account with IMAP support).

Maybe someone has such files and can provide them (similar to the many "dot-emacs" files)?


回答1:


use gnus gmail

Put the following in your ~/.gnus file and replace “user@gmail.com” with your email address:

(setq gnus-select-method
      '(nnimap "gmail"
           (nnimap-address "imap.gmail.com")
           (nnimap-server-port 993)
           (nnimap-stream ssl)))

(setq message-send-mail-function 'smtpmail-send-it
      smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
      smtpmail-auth-credentials '(("smtp.gmail.com" 587
                   "user@gmail.com" nil))
      smtpmail-default-smtp-server "smtp.gmail.com"
      smtpmail-smtp-server "smtp.gmail.com"
      smtpmail-smtp-service 587
      gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")

Put the following in your ~/.authinfo file and replace “user@gmail.com” with your email address and replace “secret” with your password—or your application-specific password:

machine imap.gmail.com login user@gmail.com password secret port 993
machine smtp.gmail.com login user@gmail.com password secret port 587

When sending your first email from gnus, you might get a STARTTLS error. If you’re using homebrew in Mac OS X, you can install the necessary package with brew install gnutls.

You can find more information in the following sections.

Run M-x gnus and enjoy.



来源:https://stackoverflow.com/questions/6008917/setup-for-gmail-in-emacs-vm

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!