需要解决问题 - 播放邮件程序API

时间:2017-11-10 19:11:30

标签: java playframework guice email-client

当我尝试从不推荐使用的API升级MailCl 2.5的MailClient时。我按照文档编写并根据文档创建了所需文件和所需文件中的条目。设置完所有内容后,当我尝试运行我的应用程序时,我在浏览器网络响应选项卡上收到以下错误。需要帮助才能解决以下错误。

import com.google.inject.Inject;    
import play.libs.mailer.MailerClient;


private final MailerClient mailerClient;    

@Inject
    public SMTPProvider(final ConfigurationManager configuration, 
     MailerClient mailerClient) {
        this.from = configuration.getString("email.from");
        this.mailerClient = mailerClient;
    }

我在浏览器网络响应列中收到此错误

Unable to create injector, see the following errors:

1) No implementation for play.libs.mailer.MailerClient was bound.
while locating play.libs.mailer.MailerClient
for parameter 1 at com...email.SMTPProvider.(SMTPProvider.java:31)

while locating com...email.SMTPProvider
for parameter 1 at com...conf.EmailProviderGuiceProvider.
(EmailProviderGuiceProvider.java:23)
at com...conf.AppModule.configure(AppModule.java:89)

1 error

0 个答案:

没有答案