68 |
(defcustom mail-specify-envelope-from nil |
(defcustom mail-specify-envelope-from nil |
69 |
"*If non-nil, specify the envelope-from address when sending mail. |
"*If non-nil, specify the envelope-from address when sending mail. |
70 |
The value used to specify it is whatever is found in |
The value used to specify it is whatever is found in |
71 |
`mail-envelope-from', with `user-mail-address' as fallback. |
the variable `mail-envelope-from', with `user-mail-address' as fallback. |
72 |
|
|
73 |
On most systems, specifying the envelope-from address |
On most systems, specifying the envelope-from address is a |
74 |
is a privileged operation." |
privileged operation. This variable affects sendmail and |
75 |
|
smtpmail -- if you use feedmail to send mail, see instead the |
76 |
|
variable `feedmail-deduce-envelope-from'." |
77 |
:version "21.1" |
:version "21.1" |
78 |
:type 'boolean |
:type 'boolean |
79 |
:group 'sendmail) |
:group 'sendmail) |
80 |
|
|
81 |
(defcustom mail-envelope-from nil |
(defcustom mail-envelope-from nil |
82 |
"*If non-nil, designate the envelope-from address when sending mail. |
"*If non-nil, designate the envelope-from address when sending mail. |
83 |
If this is nil while `mail-specify-envelope-from' is non-nil, the |
This only has an effect if `mail-specify-envelope-from' is non-nil. |
84 |
content of `user-mail-address' is used." |
The value should be either a string, or the symbol `header' (in |
85 |
|
which case the contents of the \"From\" header of the message |
86 |
|
being sent is used), or nil (in which case the value of |
87 |
|
`user-mail-address' is used)." |
88 |
:version "21.1" |
:version "21.1" |
89 |
:type '(choice (string :tag "From-name") |
:type '(choice (string :tag "From-name") |
90 |
(const :tag "Use From: header from message" header) |
(const :tag "Use From: header from message" header) |
185 |
(defvar mail-aliases t |
(defvar mail-aliases t |
186 |
"Alist of mail address aliases, |
"Alist of mail address aliases, |
187 |
or t meaning should be initialized from your mail aliases file. |
or t meaning should be initialized from your mail aliases file. |
188 |
\(The file's name is normally `~/.mailrc', but your MAILRC environment |
\(The file's name is normally `~/.mailrc', but `mail-personal-alias-file' |
189 |
variable can override that name.) |
can specify a different file name.) |
190 |
The alias definitions in the file have this form: |
The alias definitions in the file have this form: |
191 |
alias ALIAS MEANING") |
alias ALIAS MEANING") |
192 |
|
|
387 |
|
|
388 |
|
|
389 |
(defun sendmail-sync-aliases () |
(defun sendmail-sync-aliases () |
390 |
(let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) |
(when mail-personal-alias-file |
391 |
(or (equal mail-alias-modtime modtime) |
(let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) |
392 |
(setq mail-alias-modtime modtime |
(or (equal mail-alias-modtime modtime) |
393 |
mail-aliases t)))) |
(setq mail-alias-modtime modtime |
394 |
|
mail-aliases t))))) |
395 |
|
|
396 |
(defun mail-setup (to subject in-reply-to cc replybuffer actions) |
(defun mail-setup (to subject in-reply-to cc replybuffer actions) |
397 |
(or mail-default-reply-to |
(or mail-default-reply-to |
400 |
(if (eq mail-aliases t) |
(if (eq mail-aliases t) |
401 |
(progn |
(progn |
402 |
(setq mail-aliases nil) |
(setq mail-aliases nil) |
403 |
(if (file-exists-p mail-personal-alias-file) |
(when mail-personal-alias-file |
404 |
(build-mail-aliases)))) |
(if (file-exists-p mail-personal-alias-file) |
405 |
|
(build-mail-aliases))))) |
406 |
;; Don't leave this around from a previous message. |
;; Don't leave this around from a previous message. |
407 |
(kill-local-variable 'buffer-file-coding-system) |
(kill-local-variable 'buffer-file-coding-system) |
408 |
;; This doesn't work for enable-multibyte-characters. |
;; This doesn't work for enable-multibyte-characters. |
505 |
(make-local-variable 'font-lock-defaults) |
(make-local-variable 'font-lock-defaults) |
506 |
(setq font-lock-defaults '(mail-font-lock-keywords t t)) |
(setq font-lock-defaults '(mail-font-lock-keywords t t)) |
507 |
(make-local-variable 'paragraph-separate) |
(make-local-variable 'paragraph-separate) |
|
(make-local-variable 'paragraph-start) |
|
508 |
(make-local-variable 'normal-auto-fill-function) |
(make-local-variable 'normal-auto-fill-function) |
509 |
(setq normal-auto-fill-function 'mail-mode-auto-fill) |
(setq normal-auto-fill-function 'mail-mode-auto-fill) |
510 |
(make-local-variable 'fill-paragraph-function) |
(make-local-variable 'fill-paragraph-function) |
524 |
;; lines that delimit forwarded messages. |
;; lines that delimit forwarded messages. |
525 |
;; Lines containing just >= 3 dashes, perhaps after whitespace, |
;; Lines containing just >= 3 dashes, perhaps after whitespace, |
526 |
;; are also sometimes used and should be separators. |
;; are also sometimes used and should be separators. |
527 |
(setq paragraph-start (concat (regexp-quote mail-header-separator) |
(setq paragraph-separate (concat (regexp-quote mail-header-separator) |
528 |
"$\\|\t*\\([-|#;>* ]\\|(?[0-9]+[.)]\\)+$" |
"$\\|\t*\\([-|#;>* ]\\|(?[0-9]+[.)]\\)+$" |
529 |
"\\|[ \t]*[[:alnum:]]*>+[ \t]*$\\|[ \t]*$\\|" |
"\\|[ \t]*[[:alnum:]]*>+[ \t]*$\\|[ \t]*$\\|" |
530 |
"-- $\\|---+$\\|" |
"--\\( \\|-+\\)$\\|" |
531 |
page-delimiter)) |
page-delimiter))) |
|
(setq paragraph-separate paragraph-start)) |
|
532 |
|
|
533 |
|
|
534 |
(defun mail-header-end () |
(defun mail-header-end () |
691 |
|
|
692 |
;; User-level commands for sending. |
;; User-level commands for sending. |
693 |
|
|
694 |
(defun mail-send-and-exit (arg) |
(defun mail-send-and-exit (&optional arg) |
695 |
"Send message like `mail-send', then, if no errors, exit from mail buffer. |
"Send message like `mail-send', then, if no errors, exit from mail buffer. |
696 |
Prefix arg means don't delete this window." |
Prefix arg means don't delete this window." |
697 |
(interactive "P") |
(interactive "P") |
698 |
(mail-send) |
(mail-send) |
699 |
(mail-bury arg)) |
(mail-bury arg)) |
700 |
|
|
701 |
(defun mail-dont-send (arg) |
(defun mail-dont-send (&optional arg) |
702 |
"Don't send the message you have been editing. |
"Don't send the message you have been editing. |
703 |
Prefix arg means don't delete this window." |
Prefix arg means don't delete this window." |
704 |
(interactive "P") |
(interactive "P") |
705 |
(mail-bury arg)) |
(mail-bury arg)) |
706 |
|
|
707 |
(defun mail-bury (arg) |
(defun mail-bury (&optional arg) |
708 |
"Bury this mail buffer." |
"Bury this mail buffer." |
709 |
(let ((newbuf (other-buffer (current-buffer)))) |
(let ((newbuf (other-buffer (current-buffer)))) |
710 |
(bury-buffer (current-buffer)) |
(bury-buffer (current-buffer)) |
1727 |
|
|
1728 |
(provide 'sendmail) |
(provide 'sendmail) |
1729 |
|
|
1730 |
|
;;; arch-tag: 48bc1025-d993-4d31-8d81-2a29491f0626 |
1731 |
;;; sendmail.el ends here |
;;; sendmail.el ends here |