- (when other-headers other-headers))
- yank-action send-actions continue switch-function)
- ;; FIXME: Should return nil if failure.
- t))
-
-;;;###autoload
-(defun message-mailto (url)
- "Send a mail message to URL.
-The URL should be on the form \"mailto:<address>?params\"."
- (when (string-match "\\`mailto:" url)
- (setq url (substring url (match-end 0)))
- (let (to args)
- (if (string-match "\\?" url)
- (setq to (substring url 0 (match-beginning 0))
- args (substring url (match-end 0)))
- (setq to url))
- (if (not args)
- (message-mail to)
- (let ((pairs
- (mapcar (lambda (elem)
- (let ((key-val (split-string elem "=")))
- (list (capitalize (car key-val))
- (cadr key-val))))
- (split-string args "&")))
- subject)
- (when (setq subject (assoc "Subject" pairs))
- (setq pairs (delq subject pairs)
- subject (cadr subject)))
- (message-mail to subject pairs))))))
+ ;; C-h f compose-mail says that headers should be specified as
+ ;; (string . value); however all the rest of message expects
+ ;; headers to be symbols, not strings (eg message-header-format-alist).
+ ;; http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg00337.html
+ ;; We need to convert any string input, eg from rmail-start-mail.
+ (dolist (h other-headers other-headers)
+ (if (stringp (car h)) (setcar h (intern (capitalize (car h)))))))
+ yank-action send-actions continue switch-function
+ return-action)))