在 JBoss 7.1 中配置"mail.from"的位置



在JBoss AS6中,我们可以按照配置"mail.from"

<?xml version="1.0" encoding="UTF-8"?>
<server>
  <mbean code="org.jboss.mail.MailService" name="jboss:service=Mail">
    <attribute name="JNDIName">java:/TestMail</attribute>
    <attribute name="User">someUsername</attribute>
    <attribute name="Password">somePassword</attribute>
    <attribute name="Configuration">
      <!-- A test configuration -->
      <configuration>
        <!-- Change to your mail server prototocol -->
        <property name="mail.store.protocol" value="pop3"/>
        ...
        <!-- Change to the address mail will be from  -->
        <property name="mail.from" value="testuser@middlewaremagic.com"/>
        <!-- Enable debugging output from the javamail classes -->
        <property name="mail.debug" value="true"/>
      </configuration>
    </attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
</server>

在JBoss AS7中哪里可以配置它?

非常感谢!

我认为这个问题更适合超级用户。只是一个提示。:-)

然而,谷歌给我的一个简单问题是:https://issues.jboss.org/browse/AS7-1177

我认为你应该使用

<property name="mail.from">nobody@nosuchhost.nosuchdomain.com</property> 

以新的配置格式。

相关内容

最新更新