[Mail] Only show SMTP trace buffer when available
This commit is contained in:
parent
0e9f5cc5f7
commit
2ce73e0a52
|
@ -193,10 +193,11 @@ entry of the \"From: \" header and the value of
|
||||||
(if (yes-or-no-p "Sending with default account settings?")
|
(if (yes-or-no-p "Sending with default account settings?")
|
||||||
(message-smtpmail-send-it)
|
(message-smtpmail-send-it)
|
||||||
(message "Sending aborted as requested by user.")))
|
(message "Sending aborted as requested by user.")))
|
||||||
;; in case of error, display the SMTP trace buffer
|
;; in case of error, display the SMTP trace buffer if available
|
||||||
(error (shrink-window-if-larger-than-buffer
|
(error (when-let ((smtp-trace-buffer (get-buffer (format "*trace of SMTP session to %s*"
|
||||||
(display-buffer (get-buffer (format "*trace of SMTP session to %s*"
|
smtpmail-smtp-server))))
|
||||||
smtpmail-smtp-server))))
|
|
||||||
|
(shrink-window-if-larger-than-buffer (display-buffer smtp-trace-buffer)))
|
||||||
(signal (car signal-data) (cdr signal-data))))))
|
(signal (car signal-data) (cdr signal-data))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue