(require 'dired)
(require 'mm-util)
(require 'rfc2047)
+(require 'puny)
(autoload 'mailclient-send-it "mailclient")
:type '(radio (const :format "%v " nil)
(string :format "FQDN: %v")))
-(defcustom message-use-idna
- (and (or (mm-coding-system-p 'utf-8)
- (condition-case nil
- (let (mucs-ignore-version-incompatibilities)
- (require 'un-define))
- (error)))
- (condition-case nil
- (require 'idna)
- (file-error)
- (invalid-operation))
- idna-program
- (executable-find idna-program)
- (string= (idna-to-ascii "räksmörgås") "xn--rksmrgs-5wao1o")
- t)
- "Whether to encode non-ASCII in domain names into ASCII according to IDNA.
-GNU Libidn, and in particular the elisp package \"idna.el\" and
-the external program \"idn\", must be installed for this
-functionality to work."
- :version "22.1"
+(defcustom message-use-idna t
+ "Whether to encode non-ASCII in domain names into ASCII according to IDNA."
+ :version "25.2"
:group 'message-headers
:link '(custom-manual "(message)IDNA")
:type '(choice (const :tag "Ask" ask)
(autoload 'gnus-output-to-rmail "gnus-util")
(autoload 'gnus-request-post "gnus-int")
(autoload 'gnus-server-string "gnus")
-(autoload 'idna-to-ascii "idna")
(autoload 'message-setup-toolbar "messagexmas")
(autoload 'mh-new-draft-name "mh-comp")
(autoload 'mh-send-letter "mh-comp")
(defun message-insert-formatted-citation-line (&optional from date tz)
"Function that inserts a formatted citation line.
The optional FROM, and DATE are strings containing the contents of
-the From header and the Date header respectively. The optional TZ
-is a number of seconds, overrides the time zone of DATE.
+the From header and the Date header respectively.
+
+The optional TZ is omitted or nil for Emacs local time, t for
+Universal Time, `wall' for system wall clock time, or a string as
+in the TZ environment variable. It can also be a list (as from
+`current-time-zone') or an integer (as from `decode-time')
+applied without consideration for daylight saving time.
See `message-citation-line-format'."
;; The optional args are for testing/debugging. They will disappear later.
(>= i ?a)))
(push i lst)
(push (condition-case nil
- (gmm-format-time-string (format "%%%c" i) time tz)
+ (format-time-string (format "%%%c" i) time tz)
(error (format ">%c<" i)))
lst))
(setq i (1+ i)))
;; the domain part, i.e., if it is a local user's address.
(setq ace (if (string-match "\\`[[:ascii:]]*\\'" rhs)
rhs
- (downcase (idna-to-ascii rhs))))
+ (downcase (puny-encode-domain rhs))))
(when (and (not (equal rhs ace))
(or (not (eq message-use-idna 'ask))
(y-or-n-p (format "Replace %s with %s in %s:? "
(let ((case-fold-search t))
(re-search-forward "^mime-version:" nil t)))
(message-inhibit-ecomplete t)
+ ;; We don't want smtpmail.el to encode anything, either.
+ (sendmail-coding-system 'raw-text)
+ (select-safe-coding-system-function nil)
message-required-mail-headers
message-generate-hashcash
rfc2047-encode-encoded-words)