简体   繁体   English

如何在jboss As 7.0.2中使用接缝邮件?

[英]How to use seam mail with jboss As 7.0.2?

I try to send mail with seam 2.3.0.Final and jbossAs 7.0.2 我尝试使用接缝2.3.0.Final和jbossAs 7.0.2发送邮件
I send mail with seam facility, my bean code : 我使用接缝设施(我的bean代码)发送邮件:

String path = /** some Path to email template**/
        try
        {
            renderer.render(path);
        }
        catch (Exception e)
        {
            log.error(e.getMessage());
            throw new Exception(e);
        }  

In my component.xml : 在我的component.xml中:

<mail:mail-session host="smtp.gmail.com"
        username="user@domain.com"
        password="xxxx"
        ssl="true"
        tls="false"
        port="465"/>

I know that JBossAs 7.1.x has support for mail (which allows jndi's mail-session configuration) but this is not a option for us. 我知道JBossAs 7.1.x支持邮件(它允许jndi的邮件会话配置),但这不是我们的选择。
When I send an email, I get this error : 当我发送电子邮件时,出现此错误:

javax.mail.NoSuchProviderException: No provider for smtps  

Am I missing something or is it just not possible like that? 我是否缺少某些东西,或者只是不可能? If not do you think there could be a workaround? 如果没有,您认为可能有解决方法?

Check classpath of your app ( .ear.list/ .war.list files, if I'm not mistaken). 检查您应用的类路径(如果没有记错的话,请输入.ear.list / .war.list文件)。 Here this link . 这里这个链接
In our project we also used it, but it is not flexible and may soon not satisfy your needs (also low performance issue, etc), the sooner you switch to apache mail (or something) the better. 在我们的项目中,我们也使用了它,但是它不灵活并且可能很快无法满足您的需求(还有性能低下的问题等),您越早切换到apache邮件(或其他)越好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM