From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.help Subject: Re: How do I set up rmail Date: Wed, 2 Apr 2003 22:49:35 +0300 Organization: Mivtach-Simon Insurance agencies Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200304021949.h32JnZ5c030719@beta.mvs.co.il> References: Reply-To: ehud@unix.mvs.co.il NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1049314117 6514 80.91.224.249 (2 Apr 2003 20:08:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 2 Apr 2003 20:08:37 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 02 22:08:33 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 190oXB-0001gk-00 for ; Wed, 02 Apr 2003 22:08:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 190oPX-0002zg-01 for gnu-help-gnu-emacs@m.gmane.org; Wed, 02 Apr 2003 15:00:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 190oJ7-0001Aw-00 for help-gnu-emacs@gnu.org; Wed, 02 Apr 2003 14:54:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 190oI9-0000uA-00 for help-gnu-emacs@gnu.org; Wed, 02 Apr 2003 14:53:02 -0500 Original-Received: from unix.simonwiesel.co.il ([192.114.178.12] helo=unix.mvs.co.il) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 190oFl-0000Gl-00 for help-gnu-emacs@gnu.org; Wed, 02 Apr 2003 14:50:33 -0500 Original-Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.11.6/8.11.6) with ESMTP id h32Jnas15298; Wed, 2 Apr 2003 22:49:36 +0300 Original-Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.12.5/8.12.5) with ESMTP id h32JnatB030725; Wed, 2 Apr 2003 22:49:36 +0300 Original-Received: (from root@localhost) by beta.mvs.co.il (8.12.5/8.12.5/Submit) id h32JnZ5c030719; Wed, 2 Apr 2003 22:49:35 +0300 Original-To: afs016@bangor.ac.uk In-reply-to: (message from Mikey on 02 Apr 2003 17:06:57 +0100) X-Mailer: Emacs 21.3.1 rmail (send-msg 1.108) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8124 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8124 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02 Apr 2003 17:06:57 +0100, Mikey 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 account1@server.com" (interactive) (require 'rmail) ;; must have rmail (rmail-get-new-mail-from-pop "pop.server.internet.name" "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 "your.email.address") ;; 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 "your.email.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. - -- 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 http://www.mvs.co.il FAX: 1-815-5509341 / \ mailto:ehud@unix.mvs.co.il Better Safe Than Sorry -----BEGIN PGP SIGNATURE----- Comment: use http://www.keyserver.net/ to get my key (and others) iD8DBQE+iz7PLFvTvpjqOY0RAvzSAJ45qz+V0DPI7M2WMPveiVJLe+3duQCfRf0l 13Ho958EvoOrmWVfUPY6gFo= =SpBg -----END PGP SIGNATURE-----