4.3BSD/usr/contrib/emacs/lisp/sendmail.elc


(defvar mail-aliases t "Alias of mail address aliases,
or t meaning should be initialized from .mailrc.")

(defvar mail-abbrevs-loaded nil)

(defvar mail-mode-map nil)

(autoload (quote build-mail-aliases) "mailalias" "\
Read mail aliases from ~/.mailrc and set mail-aliases." nil)

(autoload (quote expand-mail-aliases) "mailalias" "\
Expand all mail aliases in suitable header fields found between BEG and END.
Suitable header fields are To, CC and BCC." nil)

(defun mail-setup (to subject in-reply-to cc replybuffer) (byte-code "	=ƒ
‰ˆÎÏ!ƒÐ ‚‚ˆ‰ˆebˆÑcˆŠ
ƒ:Ò
Ó\"ˆÔÕed\")‚<Ö ˆƒX`ÔÒ×Ó#ˆØd\"*‚Yˆ	ƒhÒÙ	Ó#‚iˆÒÚ
†rÛÓ#ˆƒƒÒÜÝ Ó#‚„ˆƒ“ÒÞÓ#‚”ˆÒ
Ó\")ˆ
ƒ¥db‚¦Âˆ
†¸
†¸	†¸ß
!ˆàá!‡" [mail-aliases t nil mail-reply-buffer replybuffer to fill-prefix cc opos in-reply-to subject mail-self-blind mail-archive-file-name mail-header-separator file-exists-p "~/.mailrc" build-mail-aliases "To: " insert "
" "	" fill-region newline "CC: " fill-region-as-paragraph "In-reply-to: " "Subject: " "" "BCC: " user-login-name "FCC: " set-buffer-modified-p run-hooks mail-setup-hook] 16))

(defun mail-mode nil "\
Major mode for editing mail to be sent.
Like Text Mode but with these additional commands:
C-c C-s mail-send (send the message)    C-c C-c  mail-send-and-exit
C-c t  mail-to  (move to To: field)	C-c s  mail-subject (move to Subj:)
C-c b  mail-bcc (move to BCC: field)    C-c c  mail-cc  (move to CC: field)
C-c w  mail-signature (insert ~/.signature at end).
C-c y  mail-yank-original (insert current message, in Rmail).
C-c q  mail-fill-yanked-message (fill what was yanked)." (interactive) (byte-code "ÁˆË ˆÌÀ!ˆ	‰ˆÍ
!ˆÎ!ˆ
‰ˆÏ‰ˆÐ‰ˆÌÊ!ˆÌÈ!ˆÑ	ÒR‰ˆÑ	Ò
R‰
ˆÓÔÕ\"‡" [mail-reply-buffer nil text-mode-syntax-table mail-mode-map local-abbrev-table text-mode-abbrev-table major-mode mode-name paragraph-start mail-header-separator paragraph-separate kill-all-local-variables make-local-variable set-syntax-table use-local-map mail-mode "Mail" "^" "$\\|^[ 	]*[-_][-_][-_]+$\\|" run-hooks text-mode-hook mail-mode-hook] 10))

(if mail-mode-map nil (setq mail-mode-map (make-sparse-keymap)) (define-key mail-mode-map "?" (quote describe-mode)) (define-key mail-mode-map "t" (quote mail-to)) (define-key mail-mode-map "b" (quote mail-bcc)) (define-key mail-mode-map "c" (quote mail-cc)) (define-key mail-mode-map "s" (quote mail-subject)) (define-key mail-mode-map "w" (quote mail-signature)) (define-key mail-mode-map "y" (quote mail-yank-original)) (define-key mail-mode-map "q" (quote mail-fill-yanked-message)) (define-key mail-mode-map "" (quote mail-send-and-exit)) (define-key mail-mode-map "" (quote mail-send)))

(defun mail-send-and-exit nil "\
Send message like mail-send, then, if no errors, exit from mail buffer." (interactive) (byte-code "ÀˆÁ ˆÂp!ˆÃÄ !Ä =ƒÅÆp!!‚Ç ‡" [nil mail-send bury-buffer next-window selected-window switch-to-buffer other-buffer delete-window] 9))

(defun mail-send nil "\
Send the message in the current buffer.
If  mail-interactive  is non-nil, wait for success indication
or error messages, and inform user.
Otherwise any failure is reported in a message back to
the user from the mailer." (interactive) (byte-code "ÁˆÂÃ!ˆÄ!ˆÅ	!ˆÆ ˆÂÇ!‡" [send-mail-function nil message "Sending..." funcall set-buffer-modified-p delete-auto-save-file-if-necessary "Sending...done"] 6))

(defun sendmail-send-it nil (byte-code "	ƒ
ËÌ!‚ÍËÎ!ÄpÏŽŠ
qˆÐ ˆÑ!ˆdbˆhÒU†0ÒcˆebˆÓÔÔQ!ˆÕÖ!ˆ×Ø!ˆÙ ‰ˆƒUÚe
\"‚VĈebˆÛÜ
	#…f`
W…pÕÔ!ˆ‚Zˆebˆ	‰ˆÛÝ
	#ƒˆÞ
!‚‰ÄˆebˆÛß
	#…¯ŠebˆÛà
	#)?…¯áØ!ˆâãä Ô#ˆebˆÛå
	#ƒÂÕæ!‚ÃĈ	ƒÒŠqˆÐ )‚ÓĈçèéêedëÊ!ƒå
‚æìíî&ïð ñ\"…ùòä D	?ƒó‚Ä#\"ˆ	ƒ9ŠqˆebˆÛô	#…!Õõ!ˆ‚ˆö÷ !?ƒ4øùúed\"\"‚5Ä)‚:Ä))-‡" [errbuf mail-interactive tembuf case-fold-search nil delimline mailbuf mail-header-separator mail-aliases t sendmail-program generate-new-buffer " sendmail errors" 0 " sendmail temp" ((byte-code "Â!ˆÃ	!ƒÂ	!‚ć" [tembuf errbuf kill-buffer bufferp nil] 4)) erase-buffer insert-buffer-substring 10 search-forward "
" replace-match "

" backward-char 1 point-marker expand-mail-aliases re-search-forward "


*" "^FCC:" mail-do-fcc "^From:" "^Sender:" forward-line insert "Sender: " user-login-name "^Subject:[ 	]*
" "" apply call-process-region append list boundp "/usr/lib/sendmail" "-oi" "-t" equal user-real-login-name "root" "-f" ("-oem" "-odb") "

* *" "; " zerop buffer-size error "Sending...failed to %s" buffer-substring] 37))

(defun mail-do-fcc (header-end) (byte-code "ÆpÇÈ!ŠebˆÉÊ
#…1Ë`Ì ˆÍÎ!ˆ`\"B‰ˆÏÐÑ!`T\"ˆ‚ˆ
qˆÒ ˆÓÔÕ Ö× Ø%ˆÙ	!ˆdbˆÚcˆÛbˆ‰ˆÜÔ#…gÝÞ!ˆßcˆ‚Tˆ…|àed@$ˆA‰ˆ‚h)ˆá
!,‡" [fcc-list rmailbuf tembuf case-fold-search t header-end nil generate-new-buffer " rmail output" re-search-forward "^FCC:[ 	]*" buffer-substring end-of-line skip-chars-backward " 	" delete-region match-beginning 0 erase-buffer insert "
From " user-login-name " " current-time-string "
" insert-buffer-substring 10 2 search-forward forward-char -5 62 write-region kill-buffer] 20))

(defun mail-to nil "\
Move point to end of To-field." (interactive) (byte-code "ÀˆÁ ˆÂÃ!‡" [nil expand-abbrev mail-position-on-field "to"] 3))

(defun mail-subject nil "\
Move point to end of Subject-field." (interactive) (byte-code "ÀˆÁ ˆÂÃ!‡" [nil expand-abbrev mail-position-on-field "Subject"] 3))

(defun mail-cc nil "\
Move point to end of CC-field.  Create a CC field if none." (interactive) (byte-code "ÁˆÂ ˆÃÄ\"†ÃÅ!ˆÆc‡" [t nil expand-abbrev mail-position-on-field "cc" "to" "
CC: "] 4))

(defun mail-bcc nil "\
Move point to end of BCC-field.  Create a BCC field if none." (interactive) (byte-code "ÁˆÂ ˆÃÄ\"†ÃÅ!ˆÆc‡" [t nil expand-abbrev mail-position-on-field "bcc" "to" "
BCC: "] 4))

(defun mail-position-on-field (field &optional soft) (byte-code "Å
ebˆÇÈÈQ!ˆÉÊ!‰ˆebˆËÌÍ!ÎQ
#ƒ5ËÏ
Ð#ˆÑ ˆÒÈ!ˆ
‚G?…GbˆÒÈ!ˆÓÈÔ#*‡" [end case-fold-search t mail-header-separator field nil soft search-forward "
" match-beginning 0 re-search-forward "^" regexp-quote ":" "^[^ 	]" move beginning-of-line skip-chars-backward insert ": "] 12))

(defun mail-signature nil "\
Sign letter with contents of ~/.signature file." (interactive) (byte-code "ÀˆŠdbˆÁÂÃ!!)‡" [nil insert-file-contents expand-file-name "~/.signature"] 3))

(defun mail-fill-yanked-message (&optional justifyp) "\
Fill the paragraphs of a message yanked into this one.
Numeric argument means justify as well." (interactive "P") (byte-code "ÁˆŠebˆÄÅÅQ	
#ˆÆ`d
$)‡" [mail-header-separator nil t justifyp search-forward "
" fill-individual-paragraphs] 6))

(defun mail-yank-original (arg) "\
Insert the message being replied to, if any (in rmail).
Puts point before the text and mark after.
Indents each nonblank line ARG spaces (default 3).
Just \\[universal-argument] as argument means don't indent
and don't delete any header fields." (interactive "P") (byte-code "ȃ@`Ä!ˆÅ!ˆ
:ƒ‚-Æ	a\"ˆÇ	a
ƒ+È
!‚,É#ˆÊ ˆl?ƒ;Ëc‚<Ã)‚AÇ" [mail-reply-buffer start arg nil delete-windows-on insert-buffer mail-yank-clear-headers indent-rigidly prefix-numeric-value 3 exchange-point-and-mark 10] 8))

(defun mail-yank-clear-headers (start end) (byte-code "ŠbˆÆÇ	
#ƒ7ŒÈ`\"ˆbˆ
É
#)…3Ê ˆË`ÉÌ!ˆÍÎ!ˆ`\"ˆ‚)‚8Å)‡" [start end t case-fold-search mail-yank-ignored-headers nil search-forward "

" narrow-to-region re-search-forward beginning-of-line delete-region "
[^ 	]" forward-char -1] 10))

(defun mail (&optional noerase to subject in-reply-to cc replybuffer) "\
Edit a message to be sent.  Argument means resume editing (don't erase).
Returns with message buffer seleted; value t if message freshly initialized.
While editing message, type C-c C-c to send the message and exit.

Various special commands starting with C-c are available in sendmail mode
to move to message header fields.  Type C-c? for a list of them.

If mail-self-blind is non-nil, a BCC to yourself is inserted
when the message is initialized.

If mail-setup-hook is bound, its value is called with no arguments
after the message is initialized.  It can add more default fields.

When calling from a program, the second through fifth arguments
 TO, SUBJECT, CC and IN-REPLY-TO specify if non-nil
 the initial contents of those header fields.
 These arguments should not have final newlines.
The sixth argument REPLYBUFFER is a buffer whose contents
 should be yanked if the user types C-c y." (interactive "P") (byte-code "ɈÊË!ˆÌÍ!‰ˆÎ	!ˆÏ ˆ
?…3Ð ?†!ÑÒ!…3Ó ˆÔ
%ˆ‡" [default-directory auto-save-default noerase to subject in-reply-to cc replybuffer t nil switch-to-buffer "*mail*" expand-file-name "~/" auto-save-mode mail-mode buffer-modified-p y-or-n-p "Unsent message being composed; erase it? " erase-buffer mail-setup] 13))

(defun mail-other-window (&optional noerase to subject in-reply-to cc replybuffer) "\
Like \"mail\" command, but display mail buffer in another window." (interactive "P") (byte-code "ʈ	ËÌ!)ˆÍÎ!‰ˆÏ!ˆÐ ˆ?…7Ñ ?†$ÒÓ!…7Ô ˆÕ
	%ˆ	‡" [pop-up-windows t default-directory auto-save-default noerase to subject in-reply-to cc replybuffer nil pop-to-buffer "*mail*" expand-file-name "~/" auto-save-mode mail-mode buffer-modified-p y-or-n-p "Unsent message being composed; erase it? " erase-buffer mail-setup] 13))