[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/mail/smtpmail.el
From: |
Sam Steingold |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/mail/smtpmail.el |
Date: |
Fri, 26 Apr 2002 14:59:11 -0400 |
Index: emacs/lisp/mail/smtpmail.el
diff -c emacs/lisp/mail/smtpmail.el:1.40 emacs/lisp/mail/smtpmail.el:1.41
*** emacs/lisp/mail/smtpmail.el:1.40 Thu Apr 25 19:39:21 2002
--- emacs/lisp/mail/smtpmail.el Fri Apr 26 14:59:08 2002
***************
*** 45,51 ****
;;(setq smtpmail-starttls-credentials
;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert")))
! ;; To queue mail, set smtpmail-queue-mail to t and use
;; smtpmail-send-queued-mail to send.
;; Modified by Stephen Cranefield <address@hidden>,
--- 45,51 ----
;;(setq smtpmail-starttls-credentials
;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert")))
! ;; To queue mail, set smtpmail-queue-mail to t and use
;; smtpmail-send-queued-mail to send.
;; Modified by Stephen Cranefield <address@hidden>,
***************
*** 86,92 ****
:type '(choice (const nil) string)
:group 'smtpmail)
! (defcustom smtpmail-smtp-server
(or (getenv "SMTPSERVER") smtpmail-default-smtp-server)
"*The name of the host running SMTP server."
:type '(choice (const nil) string)
--- 86,92 ----
:type '(choice (const nil) string)
:group 'smtpmail)
! (defcustom smtpmail-smtp-server
(or (getenv "SMTPSERVER") smtpmail-default-smtp-server)
"*The name of the host running SMTP server."
:type '(choice (const nil) string)
***************
*** 139,145 ****
:type 'boolean
:group 'smtpmail)
! (defcustom smtpmail-queue-mail nil
"*Specify if mail is queued (if t) or sent immediately (if nil).
If queued, it is stored in the directory `smtpmail-queue-dir'
and sent with `smtpmail-send-queued-mail'."
--- 139,145 ----
:type 'boolean
:group 'smtpmail)
! (defcustom smtpmail-queue-mail nil
"*Specify if mail is queued (if t) or sent immediately (if nil).
If queued, it is stored in the directory `smtpmail-queue-dir'
and sent with `smtpmail-send-queued-mail'."
***************
*** 292,298 ****
;; ... then undo escaping of matching parentheses,
;; including matching nested parentheses.
(goto-char fullname-start)
! (while (re-search-forward
"\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)"
fullname-end 1)
(replace-match "\\1(\\3)" t)
--- 292,298 ----
;; ... then undo escaping of matching parentheses,
;; including matching nested parentheses.
(goto-char fullname-start)
! (while (re-search-forward
"\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)"
fullname-end 1)
(replace-match "\\1(\\3)" t)
***************
*** 327,342 ****
(setq smtpmail-recipient-address-list
(smtpmail-deduce-address-list tembuf (point-min) delimline))
(kill-buffer smtpmail-address-buffer)
!
(smtpmail-do-bcc delimline)
; Send or queue
(if (not smtpmail-queue-mail)
(if (not (null smtpmail-recipient-address-list))
! (if (not (smtpmail-via-smtp
smtpmail-recipient-address-list tembuf))
(error "Sending failed; SMTP protocol error"))
(error "Sending failed; no recipients"))
! (let* ((file-data (concat
smtpmail-queue-dir
(concat (time-stamp-yyyy-mm-dd)
"_" (time-stamp-hh:mm:ss)
--- 327,342 ----
(setq smtpmail-recipient-address-list
(smtpmail-deduce-address-list tembuf (point-min) delimline))
(kill-buffer smtpmail-address-buffer)
!
(smtpmail-do-bcc delimline)
; Send or queue
(if (not smtpmail-queue-mail)
(if (not (null smtpmail-recipient-address-list))
! (if (not (smtpmail-via-smtp
smtpmail-recipient-address-list tembuf))
(error "Sending failed; SMTP protocol error"))
(error "Sending failed; no recipients"))
! (let* ((file-data (concat
smtpmail-queue-dir
(concat (time-stamp-yyyy-mm-dd)
"_" (time-stamp-hh:mm:ss)
***************
*** 356,367 ****
(insert (concat
"(setq smtpmail-recipient-address-list '"
(prin1-to-string smtpmail-recipient-address-list)
! ")\n"))
(write-file file-elisp)
(set-buffer (generate-new-buffer buffer-scratch))
(insert (concat file-data "\n"))
! (append-to-file (point-min)
! (point-max)
smtpmail-queue-index)
)
(kill-buffer buffer-scratch)
--- 356,367 ----
(insert (concat
"(setq smtpmail-recipient-address-list '"
(prin1-to-string smtpmail-recipient-address-list)
! ")\n"))
(write-file file-elisp)
(set-buffer (generate-new-buffer buffer-scratch))
(insert (concat file-data "\n"))
! (append-to-file (point-min)
! (point-max)
smtpmail-queue-index)
)
(kill-buffer buffer-scratch)
***************
*** 469,480 ****
(mech (car (smtpmail-intersection smtpmail-auth-supported mechs)))
(cred (if (stringp smtpmail-auth-credentials)
(let* ((netrc (netrc-parse smtpmail-auth-credentials))
! (hostentry (netrc-machine
netrc host (format "%s" (or port "smtp"))
"smtp")))
! (list host port
! (netrc-get hostentry "login")
! (netrc-get hostentry "password")))
(smtpmail-find-credentials
smtpmail-auth-credentials host port)))
(passwd (when cred
--- 469,481 ----
(mech (car (smtpmail-intersection smtpmail-auth-supported mechs)))
(cred (if (stringp smtpmail-auth-credentials)
(let* ((netrc (netrc-parse smtpmail-auth-credentials))
! (hostentry (netrc-machine
netrc host (format "%s" (or port "smtp"))
"smtp")))
! (when hostentry
! (list host port
! (netrc-get hostentry "login")
! (netrc-get hostentry "password"))))
(smtpmail-find-credentials
smtpmail-auth-credentials host port)))
(passwd (when cred
***************
*** 521,527 ****
(>= (car ret) 400))
(throw 'done nil)))
(t
! (error "Mechanism %s not implemented" mech)))
;; Remember the password.
(when (and (not (stringp smtpmail-auth-credentials))
(null (smtpmail-cred-passwd cred)))
--- 522,528 ----
(>= (car ret) 400))
(throw 'done nil)))
(t
! (error "Mechanism %s not implemented" mech)))
;; Remember the password.
(when (and (not (stringp smtpmail-auth-credentials))
(null (smtpmail-cred-passwd cred)))
***************
*** 558,564 ****
(make-local-variable 'smtpmail-read-point)
(setq smtpmail-read-point (point-min))
!
(if (or (null (car (setq greeting (smtpmail-read-response
process))))
(not (integerp (car greeting)))
(>= (car greeting) 400))
--- 559,565 ----
(make-local-variable 'smtpmail-read-point)
(setq smtpmail-read-point (point-min))
!
(if (or (null (car (setq greeting (smtpmail-read-response
process))))
(not (integerp (car greeting)))
(>= (car greeting) 400))
***************
*** 615,621 ****
(starttls-negotiate process)
(setq do-starttls nil))
(setq do-ehlo nil))))
!
(smtpmail-try-auth-methods process supported-extensions host port)
(if (or (member 'onex supported-extensions)
--- 616,622 ----
(starttls-negotiate process)
(setq do-starttls nil))
(setq do-ehlo nil))))
!
(smtpmail-try-auth-methods process supported-extensions host port)
(if (or (member 'onex supported-extensions)
***************
*** 691,697 ****
(>= (car response-code) 400))
(throw 'done nil)
))
!
;; RCPT TO: <recipient>
(let ((n 0))
(while (not (null (nth n recipient)))
--- 692,698 ----
(>= (car response-code) 400))
(throw 'done nil)
))
!
;; RCPT TO: <recipient>
(let ((n 0))
(while (not (null (nth n recipient)))
***************
*** 705,711 ****
(throw 'done nil)
)
))
!
;; DATA
(smtpmail-send-command process "DATA")
--- 706,712 ----
(throw 'done nil)
)
))
!
;; DATA
(smtpmail-send-command process "DATA")
***************
*** 767,773 ****
(setq response-strings
(cons (buffer-substring smtpmail-read-point (- match-end 2))
response-strings))
!
(goto-char smtpmail-read-point)
(if (looking-at "[0-9]+ ")
(let ((begin (match-beginning 0))
--- 768,774 ----
(setq response-strings
(cons (buffer-substring smtpmail-read-point (- match-end 2))
response-strings))
!
(goto-char smtpmail-read-point)
(if (looking-at "[0-9]+ ")
(let ((begin (match-beginning 0))
***************
*** 782,791 ****
nil
(setq response-continue nil)
(setq return-value
! (cons (string-to-int
! (buffer-substring begin end))
(nreverse response-strings)))))
!
(if (looking-at "[0-9]+-")
(progn (if smtpmail-debug-info
(message "%s" (car response-strings)))
--- 783,792 ----
nil
(setq response-continue nil)
(setq return-value
! (cons (string-to-int
! (buffer-substring begin end))
(nreverse response-strings)))))
!
(if (looking-at "[0-9]+-")
(progn (if smtpmail-debug-info
(message "%s" (car response-strings)))
***************
*** 794,800 ****
(progn
(setq smtpmail-read-point match-end)
(setq response-continue nil)
! (setq return-value
(cons nil (nreverse response-strings)))
)
)))
--- 795,801 ----
(progn
(setq smtpmail-read-point match-end)
(setq response-continue nil)
! (setq return-value
(cons nil (nreverse response-strings)))
)
)))
***************
*** 818,824 ****
smtpmail-code-conv-from)
(setq data (string-as-multibyte
(encode-coding-string data smtpmail-code-conv-from))))
!
(if smtpmail-debug-info
(insert data "\r\n"))
--- 819,825 ----
smtpmail-code-conv-from)
(setq data (string-as-multibyte
(encode-coding-string data smtpmail-code-conv-from))))
!
(if smtpmail-debug-info
(insert data "\r\n"))
***************
*** 855,861 ****
)
)
)
!
(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start
header-end)
"Get address list suitable for smtp RCPT TO: <address>."
--- 856,862 ----
)
)
)
!
(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start
header-end)
"Get address list suitable for smtp RCPT TO: <address>."