(provide (quote sendmail)) (defvar mail-aliases t "\ Alias of mail address aliases, or t meaning should be initialized from .mailrc.") (defvar mail-default-reply-to nil "\ *Address to insert as default Reply-to field of outgoing messages.") (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ˆŠ ƒ2Ó Ô\"ˆÕÖed\")‚4× ˆ…M`ÕÓØÔ#ˆÙd\"*ˆ …YÓÚ Ô#ˆÓÛ †bÜÔ#ˆ …pÓÝ Ô#ˆ …|ÓÞß Ô#ˆ …ˆÓà Ô#ˆÓÔ\")ˆ …–dbˆ †¨ †¨ †¨áÂ!ˆâã!‡" [mail-aliases t nil mail-reply-buffer replybuffer to fill-prefix cc opos in-reply-to subject mail-default-reply-to 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: " "" "Reply-to: " "BCC: " user-login-name "FCC: " set-buffer-modified-p run-hooks mail-setup-hook] 17)) (defun mail-mode nil "\ Major mode for editing mail to be sent. Separate names of recipients (in To: and Cc: fields) with commas. 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 C-f move to a header field (and create it if there isn't): C-c C-f C-t move to To: C-c C-f C-s move to Subj: C-c C-f C-b move to BCC: C-c C-f C-c move to CC: C-c C-w mail-signature (insert ~/.signature at end). C-c C-y mail-yank-original (insert current message, in Rmail). C-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 buffer-offer-save t 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 "" (quote mail-to)) (define-key mail-mode-map "" (quote mail-bcc)) (define-key mail-mode-map "" (quote mail-cc)) (define-key mail-mode-map "" (quote mail-subject)) (define-key mail-mode-map "" (quote mail-signature)) (define-key mail-mode-map "" (quote mail-yank-original)) (define-key mail-mode-map "" (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 (arg) "\ Send message like mail-send, then, if no errors, exit from mail buffer. Prefix arg means don't delete this window." (interactive "P") (byte-code "ˆà ˆÄp!ˆ?…\"Å ?…\"ŠÆÇÈ É\"!qˆ Ê=)ƒ*Ë ‚/ÌÍp!!‡" [arg major-mode nil mail-send bury-buffer one-window-p window-buffer next-window selected-window not rmail-mode delete-window switch-to-buffer other-buffer] 10)) (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†5ÓcˆebˆÔÕÖ !×Q!ˆØ×!ˆÙÚ!ˆÛ ‰ˆ …YÜe \"ˆebˆÔÝ È#…h` W…rØ×!ˆ‚]ˆÈebˆÔÞ È#…ƒß !ˆebˆÔà È#…§ŠebˆÔá È#)?…§âÚ!ˆãäå ×#ˆebˆÔæ È#…¶Øç!ˆ …ŠqˆÑ ))ˆèéêëedìË!ƒÕ ‚ÖíÄÄîï&ðå D ?…çñ#\"ˆ …ŠqˆebˆÔòÄÈ#…Øó!ˆ‚õˆôõ !?…ö÷øed\"\")))-‡" [errbuf mail-interactive tembuf case-fold-search nil delimline mailbuf buffer-undo-list t mail-header-separator mail-aliases sendmail-program generate-new-buffer " sendmail errors" 0 " sendmail temp" ((byte-code "Â!ˆÃ !…  !‡" [tembuf errbuf kill-buffer bufferp] 4)) erase-buffer insert-buffer-substring 10 re-search-forward "^" regexp-quote " " replace-match backward-char 1 point-marker expand-mail-aliases " *" "^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" "-f" ("-oem" "-odb") " * *" "; " zerop buffer-size error "Sending...failed to %s" buffer-substring] 36)) (defun mail-do-fcc (header-end) (byte-code "ÇpÇÌÍ!ÅŠebˆÎÏÅ#…7Ð`Ñ ˆÒÓ!ˆ`\"B‰ˆÔÕÖ!ר!ˆ`\"ˆ‚ˆ qˆÙ ˆÚÛÇÅÇ$ˆebˆÎÜ!ˆÐÕØ!ÝØ!\"‰ˆÙ ˆÞßà áâ ã%ˆäå!ˆæå!ˆÞ á\"ˆdbˆç !ˆdbˆècˆébˆÇêßÇÅ#…•äë!ˆìcˆ‚ƒ)ˆ…Õí@!ƒÄped   Šqˆdbˆç   #)+‚Ëîed@Å$)ˆA‰ˆ‚—)ˆï !-‡" [fcc-list rmailbuf timezone tembuf case-fold-search t header-end nil buffer curbuf beg end generate-new-buffer " rmail output" re-search-forward "^FCC:[ ]*" buffer-substring end-of-line skip-chars-backward " " delete-region match-beginning 0 forward-line 1 erase-buffer call-process "date" "[0-9] \\([A-Za-z][A-Za-z ]*[A-Za-z]\\)[0-9 ]*$" match-end insert " From " user-login-name " " current-time-string " " forward-char -1 forward-word insert-buffer-substring 10 2 search-forward -5 62 get-file-buffer write-region kill-buffer] 32)) (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Â#ƒ7ÇÎÅÏ#ˆÐ ˆÑÊ!ˆÂ‚I†GbˆÒ Ó\"ˆÑÊ!ˆÅ*‡" [end case-fold-search t mail-header-separator field nil soft re-search-forward "^" regexp-quote " " match-beginning 0 ":" "^[^ ]" move beginning-of-line skip-chars-backward insert ": "] 11)) (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 "È…;`Ä!ˆÅ!ˆ :ƒÂ/Æ Ç \"ˆÈ Ç ƒ-É !‚.Ê#ˆË ˆl?…:Ìc)‡" [mail-reply-buffer start arg nil delete-windows-on insert-buffer mail-yank-clear-headers mark indent-rigidly prefix-numeric-value 3 exchange-point-and-mark 10] 10)) (defun mail-yank-clear-headers (start end) (byte-code "ŠbˆÆÇ Â#…4ŒÈ`\"ˆbˆÂÉ ÅÂ#)…3Ê ˆË`ÉÌ!ˆÍÎ!ˆ`\"ˆ‚))‡" [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 selected; value t if message freshly initialized. While editing message, type C-c C-c to send the message and exit. Separate names of recipients with commas. Various special commands starting with C-c are available in sendmail mode to move to message header fields: \\{mail-mode-map} If mail-self-blind is non-nil, a BCC to yourself is inserted when the message is initialized. If mail-default-reply-to is non-nil, it should be an address (a string); a Reply-to: field with that address is inserted. If mail-archive-file-name is non-nil, an FCC field with that file name is inserted. If mail-setup-hook is bound, its value is run by means of run-hooks after the message is initialized. It can add more default fields. See the documentation of run-hooks. When calling from a program, the second through fifth arguments TO, SUBJECT, IN-REPLY-TO and CC 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 C-y." (interactive "P") (byte-code "ɈÊË!ˆÌÍ!‰ˆÎ !ˆÏ ˆ ?…2Ð ?†!ÑÒ!…2Ó ˆÔ %ˆÈ‡" [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 "ȈÁÉÊ!)ˆË &‡" [pop-up-windows t noerase to subject in-reply-to cc replybuffer nil pop-to-buffer "*mail*" mail] 8))