[racket] Encoding problem when using smtp-send-message send email to evernote
hi, all
I have an encoding problem when using smtp-send-message send email to evernote.
My code is:
#lang racket
(provide (all-defined-out))
(require net/dns)
(require net/head)
(require net/smtp)
(require openssl/mzssl)
(require "options.rkt")
(define (send-evernote entitle encontent)
(smtp-send-message
(dns-get-address (dns-find-nameserver) "smtp.qq.com")
"fyooo at foxmail.com"
(list EVERMAIL)
(standard-message-header
"Pentester <fyooo at foxmail.com>"
(list (string-append "fyooo <" EVERMAIL ">"))
'() ; CC
'() ; BCC
entitle)
(list encontent)
#:port-no 465
#:auth-user "fyooo"
#:auth-passwd E136PAS
#:tcp-connect ssl-connect))
The `EVERMAIL` and `E136PAS ` above is import from my config file "options.rkt".
EVERMAIL is my private evernote mail like `xxxx.yyyy at m.evernote.com`, I use it to create new note from email.
When I use this function as
(send-evernote "中文标题" "中文内容")
The title of evernote would be `ä¸ææ é¢`, which is in wrong format.
But the content would be "中文内容", which is ok.
I've try to using my web mail to send a Chinese email to my private Evernote mail, the format is ok too.
I don't know what's going on here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150129/0050b172/attachment-0001.html>