Mercurial > emacs
comparison lisp/mail/smtpmail.el @ 45204:a025c8bb9569
(smtpmail-send-it): Use user-mail-address from
calling buffer.
(smtpmail-auth-credentials): Bump :version to 21.4 (21.3 will not
have the patch).
author | Simon Josefsson <jas@extundo.com> |
---|---|
date | Thu, 09 May 2002 10:18:09 +0000 |
parents | 6ff2c20da16e |
children | ee1b06064fbb |
comparison
equal
deleted
inserted
replaced
45203:c9d37a07c5a4 | 45204:a025c8bb9569 |
---|---|
165 (repeat (list (string :tag "Server") | 165 (repeat (list (string :tag "Server") |
166 (integer :tag "Port") | 166 (integer :tag "Port") |
167 (string :tag "Username") | 167 (string :tag "Username") |
168 (choice (const :tag "Query when needed" nil) | 168 (choice (const :tag "Query when needed" nil) |
169 (string :tag "Password"))))) | 169 (string :tag "Password"))))) |
170 :version "21.3" | 170 :version "21.4" |
171 :group 'smtpmail) | 171 :group 'smtpmail) |
172 | 172 |
173 (defcustom smtpmail-starttls-credentials '(("" 25 "" "")) | 173 (defcustom smtpmail-starttls-credentials '(("" 25 "" "")) |
174 "Specify STARTTLS keys and certificates for servers. | 174 "Specify STARTTLS keys and certificates for servers. |
175 This is a list of four-element list with `servername' (a string), | 175 This is a list of four-element list with `servername' (a string), |
218 0)) | 218 0)) |
219 (tembuf (generate-new-buffer " smtpmail temp")) | 219 (tembuf (generate-new-buffer " smtpmail temp")) |
220 (case-fold-search nil) | 220 (case-fold-search nil) |
221 delimline | 221 delimline |
222 (mailbuf (current-buffer)) | 222 (mailbuf (current-buffer)) |
223 (mail-address user-mail-address) | |
223 (smtpmail-code-conv-from | 224 (smtpmail-code-conv-from |
224 (if enable-multibyte-characters | 225 (if enable-multibyte-characters |
225 (let ((sendmail-coding-system smtpmail-code-conv-from)) | 226 (let ((sendmail-coding-system smtpmail-code-conv-from)) |
226 (select-message-coding-system))))) | 227 (select-message-coding-system))))) |
227 (unwind-protect | 228 (unwind-protect |
258 (replace-match ""))) | 259 (replace-match ""))) |
259 ;; Put the "From:" field in unless for some odd reason | 260 ;; Put the "From:" field in unless for some odd reason |
260 ;; they put one in themselves. | 261 ;; they put one in themselves. |
261 (goto-char (point-min)) | 262 (goto-char (point-min)) |
262 (if (not (re-search-forward "^From:" delimline t)) | 263 (if (not (re-search-forward "^From:" delimline t)) |
263 (let* ((login user-mail-address) | 264 (let* ((login mail-address) |
264 (fullname (user-full-name))) | 265 (fullname (user-full-name))) |
265 (cond ((eq mail-from-style 'angles) | 266 (cond ((eq mail-from-style 'angles) |
266 (insert "From: " fullname) | 267 (insert "From: " fullname) |
267 (let ((fullname-start (+ (point-min) 6)) | 268 (let ((fullname-start (+ (point-min) 6)) |
268 (fullname-end (point-marker))) | 269 (fullname-end (point-marker))) |
683 "") | 684 "") |
684 ""))) | 685 ""))) |
685 ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn))) | 686 ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn))) |
686 (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s" | 687 (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s" |
687 (or mail-envelope-from | 688 (or mail-envelope-from |
688 user-mail-address) | 689 mail-address) |
689 size-part | 690 size-part |
690 body-part)) | 691 body-part)) |
691 | 692 |
692 (if (or (null (car (setq response-code (smtpmail-read-response process)))) | 693 (if (or (null (car (setq response-code (smtpmail-read-response process)))) |
693 (not (integerp (car response-code))) | 694 (not (integerp (car response-code))) |