[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending receiving emails using VM and gmail

Hi Lucas,

   I visited Bill's blog you pointed to. I had briefly toyed with the
   idea of using Postfix etc to send emails through
   smtp.gmail.com. But it seemed very complicated. I use msmtp which
   is good enough for a single user system like mine. Bill's code for
   getting mail from gmail seemed rather long.

I use stunnel to fetch my mail from gmail. The procedure is quite

 First check that stunnel id installed by opening a root shell(C-e
 C-r) and which stunnel.

If it is there then just use the following in your ~/.vm file changing
username and password:

;;-*- Mode: Emacs-Lisp -*- 
;; Directory where folders of mail are kept
(setq vm-folder-directory "~/Mail/")
(setq vm-primary-inbox "~/Mail/inbox")
;; where sent mail is stored
(setq mail-archive-file-name "~/Mail/outbox")
;; gmail settings

(setq vm-stunnel-program "/usr/sbin/stunnel")
(setq vm-spool-files '(;"/var/spool/mail/kalyanm"

For sending mail I use msmtp available as deb packages using aptget or
rpm packages.

Create a .msmtprc file in your home directory
modeled on:

account default
host smtp.gmail.com
auth on
user kalyan.infinity@gmail.com
password **
port 587
from kalyan.infinity@gmail.com
tls on

Set permission using 
$ chmod 644 .msmtprc

put this in your ~/.emacs
(setq sendmail-program "/usr/bin/msmtp)

You are ready to send mail from VM and gmail.


PS: Lucas thinks the access permission I set allows other users of my
machine to get my password. But there is no other user here, so I am
not bothered. Perhaps you should change this. msmtp will complain if
the permission is 777.

To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@cs.vassar.edu" with a
subject of "unsubscribe" or "help"

Emacspeak Files | Subscribe | Unsubscribe | Search