支持外发邮件增加List-Unsubscribe标头并升级至V2.11.1
This commit is contained in:
1 parent
bc9828b71e
commit
4286bc532c
3 files changed
+21
-2
No files matched your search
@@ -219,10 +219,11 @@ func buildCodeMessage(from string, challenge Challenge, code string) []byte {
|
||||
htmlBody := CodeHTML(challenge, code)
|
||||
|
||||
return []byte(fmt.Sprintf(
|
||||
"From: %s\r\nTo: %s\r\nSubject: %s\r\nMIME-Version: 1.0\r\nContent-Type: multipart/alternative; boundary=\"%s\"\r\n\r\n--%s\r\nContent-Type: text/plain; charset=UTF-8\r\nContent-Transfer-Encoding: 8bit\r\n\r\n%s\r\n--%s\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Transfer-Encoding: 8bit\r\n\r\n%s\r\n--%s--\r\n",
|
||||
"From: %s\r\nTo: %s\r\nSubject: %s\r\nList-Unsubscribe: <mailto:unsubscribe@%s>\r\nList-Unsubscribe-Post: List-Unsubscribe=One-Click\r\nMIME-Version: 1.0\r\nContent-Type: multipart/alternative; boundary=\"%s\"\r\n\r\n--%s\r\nContent-Type: text/plain; charset=UTF-8\r\nContent-Transfer-Encoding: 8bit\r\n\r\n%s\r\n--%s\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Transfer-Encoding: 8bit\r\n\r\n%s\r\n--%s--\r\n",
|
||||
from,
|
||||
challenge.Email,
|
||||
mime.QEncoding.Encode("UTF-8", title),
|
||||
strings.TrimSpace(strings.Split(from, "@")[len(strings.Split(from, "@"))-1]),
|
||||
boundary,
|
||||
boundary,
|
||||
text,
|
||||
|
||||
Reference in new issue
Block a user