Merge flim-1_13_2_1.
[elisp/flim.git] / smtp.el
diff --git a/smtp.el b/smtp.el
index baef1ec..532bb14 100644 (file)
--- a/smtp.el
+++ b/smtp.el
@@ -1,11 +1,10 @@
 ;;; smtp.el --- basic functions to send mail with SMTP server
 
-;; Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
 
 ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
-;;     Simon Leinen <simon@switch.ch> (ESMTP support)
-;;     MORIOKA Tomohiko <tomo@m17n.org> (separate smtp.el from smtpmail.el)
-;;     Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
+;;         Simon Leinen <simon@switch.ch> (ESMTP support)
+;;         Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
 ;; Keywords: SMTP, mail
 
 ;; This file is part of FLIM (Faithful Library about Internet Message).
@@ -73,6 +72,12 @@ don't define this value."
   :type 'boolean
   :group 'smtp)
 
+(defcustom smtp-notify-success nil
+  "*If non-nil, notification for successful mail delivery is returned 
+ to user (RFC1891)."
+  :type 'boolean
+  :group 'smtp)
 (defvar smtp-read-point nil)
 
 (defun smtp-make-fqdn ()
@@ -203,7 +208,11 @@ don't define this value."
            ;; RCPT TO:<recipient>
            (while recipients
              (smtp-send-command process
-                                (format "RCPT TO:<%s>" (car recipients)))
+                                (format
+                                 (if smtp-notify-success
+                                     "RCPT TO:<%s> NOTIFY=SUCCESS" 
+                                   "RCPT TO:<%s>")
+                                 (car recipients)))
              (setq recipients (cdr recipients))
              (setq response (smtp-read-response process))
              (if (or (null (car response))