[Top][All Lists]

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

Re: How do I set up rmail

From: Ehud Karni
Subject: Re: How do I set up rmail
Date: Wed, 2 Apr 2003 22:49:35 +0300

Hash: SHA1

On 02 Apr 2003 17:06:57 +0100, Mikey <address@hidden> wrote:
> I am trying to use emacs as a mail client.
> How do I point it to my mail server?

You don't give much information, but assuming you are referring to an
ISP with pop (reading) and smtp (sending), Add these to your .emacs:

;; General function for reading pop mail:

(defun rmail-get-new-mail-from-pop (pop-host pop-user pop-pass)
  "Get mail from pop server into current rmail file
Accepts 3 parameters (strings):
    POP-HOST - host name of pop server
    POP-USER - login name of mail user
    POP-PASS - password of mail account"
  (interactive "sPOP host name: \nsUser name: \nsMail password: ")
       (let ((sv-host (getenv "MAILHOST"))
             (sv-p-inbox rmail-primary-inbox-list)
             (sv-pass rmail-pop-password)
             (rmail-pop-password-required (not (null pop-pass)))
           (setq rmail-primary-inbox-list (list (concat "po:" pop-user)))
           (rmail-set-pop-password pop-pass)
           (setenv "MAILHOST" pop-host)            ;; pop host name
           (rmail)                                 ;; get mail from pop (rmail)
           (setq rmail-primary-inbox-list sv-p-inbox)
           (setq rmail-pop-password sv-pass)
           (setenv "MAILHOST" sv-host)))           ;; restore host name

;; define specific function for each mail (pop) server

(defun mail-pop-server-1 () "pop mail from address@hidden"
       (require 'rmail)                            ;; must have rmail
           "" "user" "password"))  
;; of course rename it to something more meaningful (for you) 
;; and put the real values for server, ser and password.

;; To read the mail do M-x mail-pop-server-1 (or assign it to a key).

;; Sending mail (by using smtpmail)

(load-library "smtpmail")

(setq mail-default-reply-to "")  ;; set 
(setq mail-signature-file "~/mail-signature-file") ;; to 
(setq mail-signature t)                            ;; your                
(setq mail-personal-alias-file "~/.mailrc")        ;; preferences
(setq mail-aliases t)                              ;;        
(setq mail-yank-prefix "> ")                       ;;        

(setq user-full-name "First Last")
(setq user-mail-address "")
(setq smtpmail-default-smtp-server "your.smtp.server")         
(setq smtpmail-smtp-server smtpmail-default-smtp-server)
(setq smtpmail-local-domain nil)
(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-debug-info t)       ;;smtpmail debug in *Messages*
(setq mail-interactive 'wait)

;; Check the help for each variable and function used above !

> Do I need to have a .mail file setup?
> What should I put in the file?

For Emacs you do not need anything more.


- -- 
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail  FAX:  1-815-5509341  / \
 mailto:address@hidden                  Better  Safe  Than  Sorry
Comment: use to get my key (and others)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]