diff options
| author | Glenn Morris | 2012-02-14 13:22:47 -0500 |
|---|---|---|
| committer | Glenn Morris | 2012-02-14 13:22:47 -0500 |
| commit | 6546b134052e9377f87f47480bc731b5dc3a9c85 (patch) | |
| tree | ce438a79d95209affad45a7cf17eccbd7929eb65 | |
| parent | 3d8badf411c8749ea9fcd7c525471fe01c416d6b (diff) | |
| download | emacs-6546b134052e9377f87f47480bc731b5dc3a9c85.tar.gz emacs-6546b134052e9377f87f47480bc731b5dc3a9c85.zip | |
* lisp/mail/smtpmail.el (smtpmail-query-smtp-server): Give it a doc.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/mail/smtpmail.el | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66c9f79006c..d8fdedfdbbd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-02-14 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * mail/smtpmail.el (smtpmail-query-smtp-server): Give it a doc. | ||
| 4 | |||
| 1 | 2012-02-14 Lars Ingebrigtsen <larsi@gnus.org> | 5 | 2012-02-14 Lars Ingebrigtsen <larsi@gnus.org> |
| 2 | 6 | ||
| 3 | * mail/smtpmail.el (smtpmail-query-smtp-server): Fix typo in the | 7 | * mail/smtpmail.el (smtpmail-query-smtp-server): Fix typo in the |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 8c56d926e0e..bbd8d7ce1ef 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail | 1 | ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> | 5 | ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> |
| 6 | ;; Maintainer: Simon Josefsson <simon@josefsson.org> | 6 | ;; Maintainer: Simon Josefsson <simon@josefsson.org> |
| @@ -596,6 +596,12 @@ The list is in preference order.") | |||
| 596 | (mapconcat 'identity (cdr response) "\n")) | 596 | (mapconcat 'identity (cdr response) "\n")) |
| 597 | 597 | ||
| 598 | (defun smtpmail-query-smtp-server () | 598 | (defun smtpmail-query-smtp-server () |
| 599 | "Query for an SMTP server and try to contact it. | ||
| 600 | If the contact succeeds, customizes and saves `smtpmail-smtp-server' | ||
| 601 | and `smtpmail-smtp-service'. This tries standard SMTP ports, and if | ||
| 602 | none works asks you to supply one. If you know that you need to use | ||
| 603 | a non-standard port, you can set `smtpmail-smtp-service' in advance. | ||
| 604 | Returns an error if the server cannot be contacted." | ||
| 599 | (let ((server (read-string "Outgoing SMTP mail server: ")) | 605 | (let ((server (read-string "Outgoing SMTP mail server: ")) |
| 600 | (ports '(25 587)) | 606 | (ports '(25 587)) |
| 601 | stream port prompted) | 607 | stream port prompted) |
| @@ -608,8 +614,7 @@ The list is in preference order.") | |||
| 608 | (open-network-stream "smtp" nil server port) | 614 | (open-network-stream "smtp" nil server port) |
| 609 | (quit nil) | 615 | (quit nil) |
| 610 | (error nil)))) | 616 | (error nil)))) |
| 611 | ;; We've used up the list of default ports, so query the | 617 | ;; We've used up the list of default ports, so query the user. |
| 612 | ;; user. | ||
| 613 | (when (and (not ports) | 618 | (when (and (not ports) |
| 614 | (not prompted)) | 619 | (not prompted)) |
| 615 | (push (read-number (format "Port number to use when contacting %s? " | 620 | (push (read-number (format "Port number to use when contacting %s? " |