Skip to content

sendBySSL 发件人名含UTF8 字符时报错 #2

@SuperGoo

Description

@SuperGoo

File: worker/mail.go
Func: sendBySSL
Desc: mailContent.FromName 包含utf8字符时,发邮件报错
Send mail error! gomail: could not send email 1: gomail: invalid address "=?UTF-8?q?.....

Fix:
m.SetHeader("From", mailContent.FromName+"<"+mailContent.From+">", )
改为
m.SetAddressHeader("From", mailContent.From, mailContent.FromName )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions