Tuesday, December 21, 2010

Finding Emacs - RMail - SUCCESS!!

Emacs has an inbuilt mail program, RMail.  This is a basic mail client that was originally intended to read mail that had been already imported to the local machine or onto the network by a Mail Transport Agent.  If you configure Rmail for POP/SMTP then RMail will take over Emacs while it is retrieving mail - you will lose all multi-tasking and Emacs will appear to freeze. You have been warned.

RMail and Copying Mbox Mail

Want to read mail in the Apple Mail folders on OSX in RMail?

Set the mail file to:

Mail: ~/Library/Mail//INBOX.mbox/mbox

ie in init.el

(setq rmail-primary-inbox-list '("Mail: ~/Library/Mail//INBOX.mbox/mbox"))

then
`rmail-preserve-inbox' to non-`nil'

ie in init.el

(setq rmail-preserve-inbox t)

RMail will now copy the mbox file over to the RMail file for you to use.  

NOTE- WARNING - I have not tried this, just tried to figure out what a few posts have said..


RMail and POP Access
After some experimentation, here is the init.el file config that worked for me. I was able to log on to my local ISP with POP and to retreive email, then to send email as well. The mail was deleted from the server when I retreived it.

;; email address 
(setq user-full-name "Firstname Lastname") 
(setq user-mail-address "username@ispname.com")

;; Movemail Program - modify your path as required 
(setq rmail-movemail-program "c:\\pro\\emacs-23.2\\bin\\movemail.exe")

;;POP
(setenv "MAILHOST" "yourISP_Pop_servername") 
(setq rmail-primary-inbox-list '("po:username@ispname.com"))
(setq rmail-pop-password-required t)  

;;SMTP 
(setq smtpmail-default-smtp-server "yourISP_smtp_servername") 
(setq smtpmail-local-domain nil) 
(setq send-mail-function 'smtpmail-send-it)
(load-library "smtpmail")

NOTE: I had to use the format for the POP line "po:username@ispname.com" to make it work.


later ...

Update 24Dec10:

  • Corrected the POP config - some formatting had been lost in the bit-bucket.
  • Movemail program that is included with Emacs will only perform non-SSL connections. Gnu has a more complete version, however I have not found a binary for Windows. As its name suggests, its purpose is to move mail between points.



Disclaimer: You will be vewy vewy careful with the above instructions!

No comments:

Post a Comment