emacsでgmail

emacs用のmailclientであるWanderlustを入れてみた.

インストール

入れ方はubuntuなら

sudo apt-get install wl

次に.emacsに次の記述を追加.は適宜変更

;; wanderlust
(autoload 'wl "wl" "Wanderlust" t)
(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)

;; IMAP
(setq elmo-imap4-default-server "imap.gmail.com")
(setq elmo-imap4-default-user "<accountname>@gmail.com") 
(setq elmo-imap4-default-authenticate-type 'clear) 
(setq elmo-imap4-default-port '993)
(setq elmo-imap4-default-stream-type 'ssl)

(setq elmo-imap4-use-modified-utf7 t) 

;; SMTP
(setq wl-smtp-connection-type 'starttls)
(setq wl-smtp-posting-port 587)
(setq wl-smtp-authenticate-type "plain")
(setq wl-smtp-posting-user "<accountname>")
(setq wl-smtp-posting-server "smtp.gmail.com")
(setq wl-local-domain "gmail.com")

(setq wl-default-folder "%inbox")
(setq wl-default-spec "%")
(setq wl-draft-folder "%[Gmail]/Drafts") ; Gmail IMAP
(setq wl-trash-folder "%[Gmail]/Trash")

(setq wl-folder-check-async t) 

(setq elmo-imap4-use-modified-utf7 t)

(autoload 'wl-user-agent-compose "wl-draft" nil t)
(if (boundp 'mail-user-agent)
    (setq mail-user-agent 'wl-user-agent))
(if (fboundp 'define-mail-user-agent)
    (define-mail-user-agent
      'wl-user-agent
      'wl-user-agent-compose
      'wl-draft-send
      'wl-draft-kill
      'mail-send-hook))

さらに,~/.foldersを作り次のように書く.

%inbox "inbox"

  1. trash "Trash"
  2. draft "Drafts"


これで,emacsを再起動し,M-x wlとすればWanderlustは起動する.

使い方

基本的にはenterで進んでqで戻る.

返信はa,メール作成はwでできる.
C-cC-cで送信,C-cC-kで破棄


メール送信を試してみたところ

no such file or directory, gnutls-cli

と怒られたが

sudo apt-get install gnutls-bin

で送れるようになった.