73 |
(setq headers-start (match-end 0) |
(setq headers-start (match-end 0) |
74 |
to (url-unhex-string (substring url 0 (match-beginning 0))) |
to (url-unhex-string (substring url 0 (match-beginning 0))) |
75 |
args (url-parse-query-string |
args (url-parse-query-string |
76 |
(substring url headers-start nil) t)) |
(substring url headers-start nil) t t)) |
77 |
(setq to (url-unhex-string url))) |
(setq to (url-unhex-string url))) |
78 |
(setq source-url (url-view-url t)) |
(setq source-url (url-view-url t)) |
79 |
(if (and url-request-data (not (assoc "subject" args))) |
(if (and url-request-data (not (assoc "subject" args))) |
84 |
(if (and source-url (not (assoc "x-url-from" args))) |
(if (and source-url (not (assoc "x-url-from" args))) |
85 |
(setq args (cons (list "x-url-from" source-url) args))) |
(setq args (cons (list "x-url-from" source-url) args))) |
86 |
|
|
87 |
(if (assoc "to" args) |
(let ((tolist (assoc "to" args))) |
88 |
(push (cdr (assoc "to" args)) to) |
(if tolist |
89 |
(setq args (cons (list "to" to) args))) |
(if (not (string= to "")) |
90 |
|
(setcdr tolist |
91 |
|
(list (concat to ", " (nth 1 tolist))))) |
92 |
|
(setq args (cons (list "to" to) args)))) |
93 |
|
|
94 |
(setq subject (cdr-safe (assoc "subject" args))) |
(setq subject (cdr-safe (assoc "subject" args))) |
95 |
(if (fboundp url-mail-command) (funcall url-mail-command) (mail)) |
(if (fboundp url-mail-command) (funcall url-mail-command) (mail)) |
96 |
(while args |
(while args |
97 |
(if (string= (caar args) "body") |
(if (string= (caar args) "body") |
98 |
(progn |
(progn |
99 |
(goto-char (point-max)) |
(goto-char (point-max)) |
100 |
(insert (mapconcat 'identity (cdar args) "\n"))) |
(insert (mapconcat |
101 |
|
#'(lambda (string) |
102 |
|
(replace-regexp-in-string "\r\n" "\n" string)) |
103 |
|
(cdar args) "\n"))) |
104 |
(url-mail-goto-field (caar args)) |
(url-mail-goto-field (caar args)) |
105 |
(setq func (intern-soft (concat "mail-" (caar args)))) |
(setq func (intern-soft (concat "mail-" (caar args)))) |
106 |
(insert (mapconcat 'identity (cdar args) ", "))) |
(insert (mapconcat 'identity (cdar args) ", "))) |