1 ;;; smtp.el --- basic functions to send mail with SMTP server
3 ;; Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001 ,2002, 2004
4 ;; Free Software Foundation, Inc.
6 ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
7 ;; Simon Leinen <simon@switch.ch> (ESMTP support)
8 ;; Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
9 ;; Daiki Ueno <ueno@unixuser.org>
10 ;; Keywords: SMTP, mail
12 ;; This file is part of FLIM (Faithful Library about Internet Message).
14 ;; This program is free software; you can redistribute it and/or
15 ;; modify it under the terms of the GNU General Public License as
16 ;; published by the Free Software Foundation; either version 2, or (at
17 ;; your option) any later version.
19 ;; This program is distributed in the hope that it will be useful, but
20 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 ;; General Public License for more details.
24 ;; You should have received a copy of the GNU General Public License
25 ;; along with this program; see the file COPYING. If not, write to the
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27 ;; Boston, MA 02110-1301, USA.
36 (require 'mail-utils) ; mail-strip-quoted-names
39 (require 'mel) ; binary-funcall
42 "SMTP protocol for sending mail."
45 (defgroup smtp-extensions nil
46 "SMTP service extensions (RFC1869)."
49 (defcustom smtp-default-server nil
50 "Specify default SMTP server."
51 :type '(choice (const nil) string)
54 (defcustom smtp-server (or (getenv "SMTPSERVER") smtp-default-server)
55 "The name of the host running SMTP server.
56 It can also be a function
57 called from `smtp-via-smtp' with arguments SENDER and RECIPIENTS."
58 :type '(choice (string :tag "Name")
59 (function :tag "Function"))
62 (defcustom smtp-send-by-myself nil
63 "If non-nil, smtp.el send a mail by myself without smtp-server.
64 This option requires \"dig.el\"."
68 (defcustom smtp-service "smtp"
69 "SMTP service port number. \"smtp\" or 25."
70 :type '(choice (integer :tag "25" 25)
71 (string :tag "smtp" "smtp"))
74 (defcustom smtp-local-domain nil
75 "Local domain name without a host name.
76 If the function (system-name) returns the full internet address,
77 don't define this value."
78 :type '(choice (const nil) string)
81 (defcustom smtp-fqdn nil
82 "Fully qualified domain name used for Message-ID."
83 :type '(choice (const nil) string)
86 (defcustom smtp-use-8bitmime t
87 "If non-nil, use ESMTP 8BITMIME (RFC1652) if available."
89 :group 'smtp-extensions)
91 (defcustom smtp-use-size t
92 "If non-nil, use ESMTP SIZE (RFC1870) if available."
94 :group 'smtp-extensions)
96 (defcustom smtp-use-starttls nil
97 "If non-nil, use STARTTLS (RFC2595) if available."
99 :group 'smtp-extensions)
101 (defcustom smtp-use-starttls-ignore-error nil
102 "If non-nil, do not use STARTTLS if STARTTLS is not available."
104 :group 'smtp-extensions)
106 (defcustom smtp-starttls-program "starttls"
107 "The program to run in a subprocess to open an TLSv1 connection."
108 :group 'smtp-extensions)
110 (defcustom smtp-starttls-extra-args nil
111 "Extra arguments to `starttls-program'"
112 :group 'smtp-extensions)
114 (defcustom smtp-use-sasl nil
115 "If non-nil, use SMTP Authentication (RFC2554) if available."
117 :group 'smtp-extensions)
119 (defcustom smtp-sasl-user-name (user-login-name)
120 "Identification to be used for authorization."
122 :group 'smtp-extensions)
124 (defcustom smtp-sasl-properties nil
125 "Properties set to SASL client."
127 :group 'smtp-extensions)
129 (defcustom smtp-sasl-mechanisms nil
130 "List of authentication mechanisms."
131 :type '(repeat string)
132 :group 'smtp-extensions)
134 (defcustom smtp-progress-message-format nil
135 "Format string used to show progress message while sending mails.
136 It allows the following special format specifiers:
138 %b means show the number of bytes which has been sent
139 and the total bytes of a mail.
140 %k means show the number of kilobytes which has been sent
141 and the total kilobytes of a mail.
142 %l means show the number of lines which has been sent
143 and the total lines of a mail.
145 For instance, the value \"Sending (%k)...\" shows like
146 \"Sending (45k/123k)...\" in the echo area."
147 :type '(radio (string :format "%v\n" :size 0 :value "Sending (%k)...")
148 (const :tag "Don't show progress message" nil))
151 (defcustom smtp-debug nil
152 "*If non-nil, smtp debug info printout into messages."
156 (defvar sasl-mechanisms)
159 (defvar smtp-open-connection-function #'open-network-stream
160 "*Function used for connecting to a SMTP server.
161 The function will be called with the same four arguments as
162 `open-network-stream' and should return a process object.
165 \(setq smtp-open-connection-function
166 #'(lambda (name buffer host service)
167 (let ((process-connection-type nil))
168 (start-process name buffer \"ssh\" \"-C\" host
169 \"nc\" host service))))
171 It connects to a SMTP server using \"ssh\" before actually connecting
172 to the SMTP port. Where the command \"nc\" is the netcat executable;
173 see http://www.atstake.com/research/tools/index.html#network_utilities
176 (defvar smtp-read-point nil)
178 (defvar smtp-connection-alist nil)
180 (defvar smtp-submit-package-function #'smtp-submit-package)
183 ;;; A package contains a mail message, an envelope sender address,
184 ;;; and one or more envelope recipient addresses. In ESMTP model
185 ;;; the current sending package should be guaranteed to be accessible
186 ;;; anywhere from the hook methods (or SMTP commands).
189 (luna-define-class smtp-package ()
194 (luna-define-internal-accessors 'smtp-package))
196 (defun smtp-make-package (sender recipients buffer)
197 "Create a new package structure.
198 A package is a unit of SMTP message
199 SENDER specifies the package sender, a string.
200 RECIPIENTS is a list of recipients.
201 BUFFER may be a buffer or a buffer name which contains mail message."
202 (luna-make-entity 'smtp-package :sender sender :recipients recipients :buffer buffer))
204 (defun smtp-package-buffer-internal-size (package)
205 "Return the size of PACKAGE, an integer."
207 (set-buffer (smtp-package-buffer-internal package))
210 ;; Add one byte for each change-of-line
211 ;; because or CR-LF representation:
212 (count-lines (point-min) (point-max))
213 ;; For some reason, an empty line is
214 ;; added to the message. Maybe this
215 ;; is a bug, but it can't hurt to add
216 ;; those two bytes anyway:
218 (goto-char (point-min))
219 (while (re-search-forward "^\\." nil t)
220 (setq size (1+ size)))
223 ;;; @ SMTP connection
224 ;;; We should consider the function `open-network-stream' is a emulation
225 ;;; for another network stream. They are likely to be implemented with an
226 ;;; external program and the function `process-contact' returns the
227 ;;; process id instead of `(HOST SERVICE)' pair.
230 (luna-define-class smtp-connection ()
238 (luna-define-internal-accessors 'smtp-connection))
240 (defun smtp-make-connection (process server service)
241 "Create a new connection structure.
242 PROCESS is an internal subprocess-object. SERVER is name of the host
243 to connect to. SERVICE is name of the service desired."
244 (luna-make-entity 'smtp-connection :process process :server server :service service))
246 (luna-define-generic smtp-connection-opened (connection)
247 "Say whether the CONNECTION to server has been opened.")
249 (luna-define-generic smtp-close-connection (connection)
250 "Close the CONNECTION to server.")
252 (luna-define-method smtp-connection-opened ((connection smtp-connection))
253 (let ((process (smtp-connection-process-internal connection)))
254 (if (memq (process-status process) '(open run))
257 (luna-define-method smtp-close-connection ((connection smtp-connection))
258 (let ((process (smtp-connection-process-internal connection)))
259 (delete-process process)))
261 (defun smtp-make-fqdn ()
262 "Return user's fully qualified domain name."
265 (let ((system-name (system-name)))
268 (concat system-name "." smtp-local-domain))
269 ((string-match "[^.]\\.[^.]" system-name)
272 (error "Cannot generate valid FQDN"))))))
274 (defun smtp-find-connection (buffer)
275 "Find the connection delivering to BUFFER."
276 (let ((entry (assq buffer smtp-connection-alist))
279 (setq connection (nth 1 entry))
280 (if (smtp-connection-opened connection)
282 (setq smtp-connection-alist
283 (delq entry smtp-connection-alist))
287 (autoload 'starttls-open-stream "starttls")
288 (autoload 'starttls-negotiate "starttls"))
290 (defun smtp-open-connection (buffer server service)
291 "Open a SMTP connection for a service to a host.
292 Return a newly allocated connection-object.
293 BUFFER is the buffer to associate with the connection. SERVER is name
294 of the host to connect to. SERVICE is name of the service desired."
296 (binary-funcall smtp-open-connection-function
297 "SMTP" buffer server service))
300 (setq connection (smtp-make-connection process server service))
301 (set-process-filter process 'smtp-process-filter)
302 (setq smtp-connection-alist
303 (cons (list buffer connection)
304 smtp-connection-alist))
308 (autoload 'dig-invoke "dig")
309 (autoload 'dig-extract-rr "dig"))
311 (defun smtp-find-mx (domain &optional doerror)
313 ;; dig.el resolves only primally MX.
314 (cond ((setq server (smtp-dig domain "MX"))
315 (progn (string-match " \\([^ ]*\\)$" server)
316 (match-string 1 server)))
317 ((smtp-dig domain "A")
321 (error (format "SMTP cannot resolve %s" domain)))))))
323 (defun smtp-dig (domain type)
326 (setq dig-buf (dig-invoke domain type)))
328 (dig-extract-rr domain type)
329 (kill-buffer dig-buf))))
331 (defun smtp-find-server (recipients)
334 (mapcar (lambda (recipient)
336 (if (and (string-match "@\\([^\t\n ]*\\)" recipient)
339 (match-string 1 recipient))))
340 (cons server (list recipient))
341 (error (format "cannot find server for %s." recipient)))))
344 (while (setq rets (pop rec))
345 (if (setq ret (assoc (car rets) rec))
347 (append (cdr ret) (cdr rets)))
349 (append rlist (list rets)))))
353 (defun smtp-via-smtp (sender recipients buffer)
354 "Like `smtp-send-buffer', but sucks in any errors."
357 (smtp-send-buffer sender recipients buffer)
361 (make-obsolete 'smtp-via-smtp "It's old API.")
364 (defun smtp-send-buffer (sender recipients buffer)
366 SENDER is an envelope sender address.
367 RECIPIENTS is a list of envelope recipient addresses.
368 BUFFER may be a buffer or a buffer name which contains mail message."
369 (if smtp-send-by-myself
370 (smtp-send-buffer-by-myself sender recipients buffer)
372 (if (functionp smtp-server)
373 (funcall smtp-server sender recipients)
375 (error "`smtp-server' not defined"))))
377 (smtp-make-package sender recipients buffer))
378 (starttls-program smtp-starttls-program)
379 (starttls-extra-args smtp-starttls-extra-args)
380 (smtp-open-connection-function
381 (if smtp-use-starttls
382 #'starttls-open-stream
383 smtp-open-connection-function)))
387 (format "*trace of SMTP session to %s*" server)))
389 (buffer-disable-undo)
390 (unless (smtp-find-connection (current-buffer))
391 (smtp-open-connection (current-buffer) server smtp-service))
392 (make-local-variable 'smtp-read-point)
393 (setq smtp-read-point (point-min))
394 (funcall smtp-submit-package-function package)))))
396 (defun smtp-submit-package (package)
399 (smtp-primitive-greeting package)
401 (smtp-primitive-ehlo package)
403 (smtp-primitive-helo package)))
404 (if smtp-use-starttls
406 (smtp-connection-extensions-internal
407 (smtp-find-connection (current-buffer))))
409 (smtp-primitive-starttls package)
410 (smtp-primitive-ehlo package))
411 (unless smtp-use-starttls-ignore-error
412 (error "STARTTLS is not supported on this server"))))
414 (smtp-primitive-auth package))
415 (smtp-primitive-mailfrom package)
416 (smtp-primitive-rcptto package)
417 (smtp-primitive-data package))
418 (let ((connection (smtp-find-connection (current-buffer))))
419 (when (smtp-connection-opened connection)
421 (smtp-primitive-quit package)
423 (smtp-close-connection connection)))))
425 (defun smtp-send-buffer-by-myself (sender recipients buffer)
426 "Send a message by myself.
427 SENDER is an envelope sender address.
428 RECIPIENTS is a list of envelope recipient addresses.
429 BUFFER may be a buffer or a buffer name which contains mail message."
431 (smtp-find-server recipients))
432 (smtp-open-connection-function
433 (if smtp-use-starttls
434 #'starttls-open-stream
435 smtp-open-connection-function))
438 (setq server (caar servers))
439 (setq recipients (cdar servers))
440 (if (not (and server recipients))
441 ;; MAILER-DAEMON is required. :)
442 (error (format "Cannot send <%s>"
443 (mapconcat 'concat recipients ">,<"))))
445 (smtp-make-package sender recipients buffer))
449 (format "*trace of SMTP session to %s*" server)))
451 (buffer-disable-undo)
452 (unless (smtp-find-connection (current-buffer))
453 (smtp-open-connection (current-buffer) server smtp-service))
454 (make-local-variable 'smtp-read-point)
455 (setq smtp-read-point (point-min))
456 (let ((smtp-use-sasl nil)
457 (smtp-use-starttls-ignore-error t))
458 (funcall smtp-submit-package-function package)))
459 (setq servers (cdr servers)))))
461 ;;; @ hook methods for `smtp-submit-package'
464 (defun smtp-primitive-greeting (package)
466 (smtp-find-connection (current-buffer)))
468 (smtp-read-response connection)))
469 (if (/= (car response) 220)
470 (smtp-response-error response))))
472 (defun smtp-primitive-ehlo (package)
474 (smtp-find-connection (current-buffer)))
476 (smtp-send-command connection (format "EHLO %s" (smtp-make-fqdn)))
477 (setq response (smtp-read-response connection))
478 (if (/= (car response) 250)
479 (smtp-response-error response))
480 (smtp-connection-set-extensions-internal
484 (split-string extension)))
486 (car (read-from-string
487 (downcase (car extensions)))))
491 (defun smtp-primitive-helo (package)
493 (smtp-find-connection (current-buffer)))
495 (smtp-send-command connection (format "HELO %s" (smtp-make-fqdn)))
496 (setq response (smtp-read-response connection))
497 (if (/= (car response) 250)
498 (smtp-response-error response))))
500 (defun smtp-primitive-auth (package)
502 (smtp-find-connection (current-buffer)))
504 (cdr (assq 'auth (smtp-connection-extensions-internal connection))))
506 (or smtp-sasl-mechanisms sasl-mechanisms))
508 (sasl-find-mechanism mechanisms))
514 (error "No authentication mechanism available"))
515 (setq client (sasl-make-client mechanism smtp-sasl-user-name "smtp"
516 (smtp-connection-server-internal connection)))
517 (if smtp-sasl-properties
518 (sasl-client-set-properties client smtp-sasl-properties))
519 (setq name (sasl-mechanism-name mechanism)
520 ;; Retrieve the initial response
521 step (sasl-next-step client nil))
524 (if (sasl-step-data step)
525 (format "AUTH %s %s" name (base64-encode-string (sasl-step-data step) t))
526 (format "AUTH %s" name)))
529 (setq response (smtp-read-response connection))
530 (when (= (car response) 235)
531 ;; The authentication process is finished.
532 (setq step (sasl-next-step client step))
535 (smtp-response-error response)) ;Bogus server?
536 (if (/= (car response) 334)
537 (smtp-response-error response))
538 (sasl-step-set-data step (base64-decode-string (nth 1 response)))
539 (setq step (sasl-next-step client step))
542 (if (sasl-step-data step)
543 (base64-encode-string (sasl-step-data step) t)
545 ;;; (smtp-connection-set-encoder-internal
546 ;;; connection (sasl-client-encoder client))
547 ;;; (smtp-connection-set-decoder-internal
548 ;;; connection (sasl-client-decoder client))
551 (defun smtp-primitive-starttls (package)
553 (smtp-find-connection (current-buffer)))
555 ;; STARTTLS --- begin a TLS negotiation (RFC 2595)
556 (smtp-send-command connection "STARTTLS")
557 (setq response (smtp-read-response connection))
558 (if (/= (car response) 220)
559 (smtp-response-error response))
560 (starttls-negotiate (smtp-connection-process-internal connection))))
562 (defun smtp-primitive-mailfrom (package)
564 (smtp-find-connection (current-buffer)))
566 (smtp-connection-extensions-internal
569 (smtp-package-sender-internal package))
572 ;; SIZE --- Message Size Declaration (RFC1870)
573 (if (and smtp-use-size
574 (assq 'size extensions))
575 (setq extension (format "SIZE=%d" (smtp-package-buffer-internal-size package))))
576 ;; 8BITMIME --- 8bit-MIMEtransport (RFC1652)
577 (if (and smtp-use-8bitmime
578 (assq '8bitmime extensions))
579 (setq extension (concat extension " BODY=8BITMIME")))
583 (format "MAIL FROM:<%s> %s" sender extension)
584 (format "MAIL FROM:<%s>" sender)))
585 (setq response (smtp-read-response connection))
586 (if (/= (car response) 250)
587 (smtp-response-error response))))
589 (defun smtp-primitive-rcptto (package)
591 (smtp-find-connection (current-buffer)))
593 (smtp-package-recipients-internal package))
597 connection (format "RCPT TO:<%s>" (pop recipients)))
598 (setq response (smtp-read-response connection))
599 (unless (memq (car response) '(250 251))
600 (smtp-response-error response)))))
602 (defun smtp-primitive-data (package)
604 (smtp-find-connection (current-buffer)))
606 (smtp-send-command connection "DATA")
607 (setq response (smtp-read-response connection))
608 (if (/= (car response) 354)
609 (smtp-response-error response))
611 (set-buffer (smtp-package-buffer-internal package))
612 (setq def (smtp-parse-progress-message-format))
613 (goto-char (point-min))
616 connection (buffer-substring (point) (progn (end-of-line)(point))))
617 (beginning-of-line 2)
618 (setq prev (smtp-show-progress-message def prev))))
619 (smtp-send-command connection ".")
620 (setq response (smtp-read-response connection))
621 (if (/= (car response) 250)
622 (smtp-response-error response))))
624 (defun smtp-primitive-quit (package)
626 (smtp-find-connection (current-buffer)))
628 (smtp-send-command connection "QUIT")
629 (setq response (smtp-read-response connection))
630 (if (/= (car response) 221)
631 (smtp-response-error response))))
633 ;;; @ low level process manipulating function
635 (defun smtp-process-filter (process output)
637 (set-buffer (process-buffer process))
638 (goto-char (point-max))
641 (put 'smtp-error 'error-message "SMTP error")
642 (put 'smtp-error 'error-conditions '(smtp-error error))
644 (put 'smtp-response-error 'error-message "SMTP response error")
645 (put 'smtp-response-error 'error-conditions '(smtp-response-error smtp-error error))
647 (defun smtp-response-error (response)
648 (signal 'smtp-response-error response))
650 (defun smtp-read-response (connection)
652 (smtp-connection-decoder-internal connection))
653 (response-continue t)
655 (while response-continue
656 (goto-char smtp-read-point)
657 (while (not (re-search-forward "\r?\n" nil t))
658 (unless (smtp-connection-opened connection)
659 (signal 'smtp-error "Connection closed"))
660 (accept-process-output (smtp-connection-process-internal connection))
661 (goto-char smtp-read-point))
662 (let ((bol smtp-read-point)
663 (eol (match-beginning 0)))
665 (let ((string (buffer-substring bol eol)))
666 (delete-region bol (point))
667 (insert (funcall decoder string))
670 (setq smtp-read-point (point))
673 ((looking-at "[1-5][0-9][0-9]\\([ -]\\)")
676 (list (buffer-substring (match-end 0) eol))))
677 (when (string= (match-string 1) " ")
678 (setq response (cons (read (point-marker)) response)
679 response-continue nil)))
681 (message "Invalid response: %s" (buffer-substring bol eol))))))
684 (defun smtp-send-command (connection command)
687 (smtp-connection-process-internal connection))
689 (smtp-connection-encoder-internal connection)))
690 (set-buffer (process-buffer process))
691 (goto-char (point-max))
692 (setq command (concat command "\r\n"))
694 (setq smtp-read-point (point))
696 (setq command (funcall encoder command)))
697 (process-send-string process command))))
699 (defun smtp-send-data (connection data)
701 (smtp-connection-process-internal connection))
703 (smtp-connection-encoder-internal connection)))
704 ;; Escape "." at start of a line.
705 (if (eq (string-to-char data) ?.)
706 (setq data (concat "." data "\r\n"))
707 (setq data (concat data "\r\n")))
709 (setq data (funcall encoder data)))
710 (process-send-string process data)))
712 (defun smtp-deduce-address-list (smtp-text-buffer header-start header-end)
713 "Get address list suitable for smtp RCPT TO:<address>."
714 (let ((simple-address-list "")
718 (smtp-address-buffer (generate-new-buffer " *smtp-mail*")))
722 (set-buffer smtp-address-buffer)
723 (setq case-fold-search t)
725 (insert (save-excursion
726 (set-buffer smtp-text-buffer)
727 (buffer-substring-no-properties header-start header-end)))
728 (goto-char (point-min))
729 ;; RESENT-* fields should stop processing of regular fields.
731 (if (re-search-forward "^RESENT-TO:" header-end t)
733 "^\\(RESENT-TO:\\|RESENT-CC:\\|RESENT-BCC:\\)")
734 (setq addr-regexp "^\\(TO:\\|CC:\\|BCC:\\)")))
736 (while (re-search-forward addr-regexp header-end t)
738 (setq this-line (match-beginning 0))
740 ;; get any continuation lines.
741 (while (and (looking-at "^[ \t]+") (< (point) header-end))
743 (setq this-line-end (point-marker))
744 (setq simple-address-list
745 (concat simple-address-list " "
746 (mail-strip-quoted-names
747 (buffer-substring this-line this-line-end)))))
749 (insert " " simple-address-list "\n")
751 (subst-char-in-region (point-min) (point-max) 10 ? t)
753 (subst-char-in-region (point-min) (point-max) ?, ? t)
755 (subst-char-in-region (point-min) (point-max) 9 ? t)
757 (goto-char (point-min))
758 ;; tidyness in case hook is not robust when it looks at this
759 (while (re-search-forward "[ \t]+" header-end t) (replace-match " "))
761 (goto-char (point-min))
762 (let (recipient-address-list)
763 (while (re-search-forward " \\([^ ]+\\) " (point-max) t)
765 (setq recipient-address-list
766 (cons (buffer-substring (match-beginning 1) (match-end 1))
767 recipient-address-list)))
768 recipient-address-list))
769 (kill-buffer smtp-address-buffer))))
771 ;;; @ functions used to show progress message
773 (defun smtp-parse-progress-message-format ()
774 "Parse the `smtp-progress-message-format' variable.
775 Return nil, or a cons of an ordinary format string and a type including
776 nil, the symbols `b', `k' and `l'."
777 (when smtp-progress-message-format
778 (let ((format smtp-progress-message-format)
781 (while (string-match "%\\([bkl]\\)\\|%\\([^%bkl]\\|\\'\\)" format index)
784 (setq index (match-end 0)
785 type (intern (match-string 1 format))
786 format (replace-match
789 (number-to-string (buffer-size))))
791 (if (>= (buffer-size) 512)
794 (/ (+ (buffer-size) 512) 1024))
798 (number-to-string (buffer-size)))))
802 (count-lines (point-min)
805 (setq index (1+ (match-end 0))
806 format (replace-match "%\\&" nil nil format))))
807 (cons format type))))
809 (defun smtp-show-progress-message (def prev)
810 "Show progress message while sending mails.
811 DEF is a cons cell which is pre-computed by the
812 `smtp-parse-progress-message-format' function or nil.
813 PREV is a number shown last time or nil.
814 Return a number computed this time."
816 (let* ((fmt (car def))
818 (value (cond ((eq type 'b)
819 (- (point) (point-min)))
821 (/ (- (point) (point-min) -512) 1024))
823 (count-lines (point-min) (point)))))
829 (cond ((featurep 'xemacs)
830 (display-message 'no-log (if value
836 (message "%s" fmt))))
841 ;;; smtp.el ends here