Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

邮件发送正文乱码且导致附件图片损坏 #3

Closed
baboowang opened this issue Feb 3, 2016 · 2 comments
Closed

邮件发送正文乱码且导致附件图片损坏 #3

baboowang opened this issue Feb 3, 2016 · 2 comments
Labels

Comments

@baboowang
Copy link

PostQRcode的正文显示的是乱码,并且附件的图片会损坏(测试下来是正文乱码导致的)

正文:
请使用手机微信扫描附件中的二维码

ps:测试使用的是qq邮箱


另外,如果没有设置参数subject的话,下面这行会报错,$client->user在这个阶段并没有初始化。

$data->{subject} = "微信帐号 " . $client->user->displayname . " 扫描二维码" if not defined $data->{subject};

@hexsum
Copy link
Owner

hexsum commented Feb 5, 2016

@baboowang

另外,如果没有设置参数subject的话,下面这行会报错,$client->user在这个阶段并没有初始化。

$data->{subject} = "微信帐号 " . $client->user->displayname . " 扫描二维码" if not defined $data->{subject};

这个问题我已经修复了,在input_qrcode事件触发的时候,客户端还没有login成功,根本不知道是登录了什么帐号信息

关于你提到的

PostQRcode的正文显示的是乱码,并且附件的图片会损坏的问题

目前程序使用的Mojo::SMTP::Client模块连接qq的smtp服务有问题,我这边无法使用qq来发送邮件

[error] 插件[Mojo::Weixin::Plugin::PostQRcode]邮件发送失败: Must issue a STARTTLS command first.

所以不太清楚你是怎么发送邮件的,如果对perl熟悉的话 推荐你自己写自己的发送邮件回调

$client->on(input_qrcode=>sub{ #需要扫描二维码时会触发该事件
    my($client,$qrcode_path)=@_;  #传递给回调的第二个参数是二维码文件路径

    在这里实现你自己邮件发送二维码的功能

});

@hexsum hexsum added the bug label Feb 16, 2016
@hexsum
Copy link
Owner

hexsum commented Mar 5, 2016

QQ邮箱请使用smtp的25端口

@hexsum hexsum closed this as completed Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants