[solved]: Re: messages with international Unicode E-mail addresses

Jean Louis <[email protected]> Sat, 26 Jun 2021 17:22:42 +0300
Newsgroups gmane.comp.gnu.mailutils.bugs
Message-ID <[email protected]>
That was definitely the problem. I have improved the function and now
I do not see rejection problem.

It means servers are giving wrong information about email addresses
while the real problem is with file names.

(defun rcd-mailutils-mail-files (files)
  "Return list with \"mail\" program arguments for file attachments."
  (cond ((stringp files) (when (and (not (seq-empty-p files)) 
				  (file-readable-p files))
			     (list "--content-filename" (rcd-rfc2047-encode (file-name-nondirectory files)) "--content-type" (rcd-mime-type files t) "-A" files)))
	((listp files) (let (list)
			 (while files
			   (let ((file (pop files)))
			     (when (and (not (seq-empty-p file)) 
					(file-readable-p file))
			       (push file list)
			       (push "-A" list)
			       (push (rcd-mime-type file t) list)
			       (push "--content-type" list)
			       (push (rcd-rfc2047-encode (file-name-nondirectory file)) list)
			       (push "--content-filename" list))))
			 list))))



Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/