ofbiz 邮件「建议收藏」

(27) 2023-03-27 12:29

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说ofbiz 邮件「建议收藏」,希望能够帮助你!!!。
ofbiz 邮件「建议收藏」_https://bianchenghao6.com/blog__第1张

最近在研究ofbiz的一些东东,看到了,就记录下。

ofbiz 邮件发送,先看一下邮件发送在哪应用了,直接上图。在party管理中。

ofbiz 邮件「建议收藏」_https://bianchenghao6.com/blog__第2张

这个是需要配置party的联系机制,当然邮件发送嘛,一定要配置邮件信息,在这里就不说了,自己配置。

那调用的哪个服务呢?

services_email.xml   这个就会告诉你ofbiz中邮件系统的管理有哪些服务,当然,您也可以自己拓展,在这我只说个例子而已。

ofbiz的邮件配置

framework\common\config\general.properties   这里包含基本的配置

# -- general default 'fromEmailAddress' can be overridden in: EmailTemplateSetting
defaultFromEmailAddress=ofbiztest@example.com

# -- The default domainname used in the notification emails links
# as 'baseUrl' and 'baseSecureUrl' are set in the url.properties file. 

# -- mail notifications enabled (Y|N)
mail.notifications.enabled=N

# -- redirect all mail notifications to this address for testing
#mail.notifications.redirectTo=

# -- the default mail server to use
mail.smtp.relay.host=localhost

# -- SMTP Auth settings
#mail.smtp.auth.user=
#mail.smtp.auth.password=

# -- Additional Required Fields needed for Gmail and other non traditional smtp servers
# -- These added fields also work for Yahoo business mail for instance
# -- Gmail smtp port can be either 465 or 587
#mail.smtp.port=465
# -- Gmail requires StartTLS
#mail.smtp.starttls.enable=true

# -- Gmail requires a JSSE socket factory, the following socketFactory settings will override JavaMail's default socketFactory settings
# -- Port needs to be the same as mail.smtp.port
#mail.smtp.socketFactory.port=465
#mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
#--Fallback [true|false] determines whether you will allow a non secure connection if you are unable to get a secure one
#mail.smtp.socketFactory.fallback=false

# -- how the address are matched with the CRM addresses
mail.address.caseInsensitive=N

# -- debug SMTP mail option enabled (Y|N)
mail.debug.on=N

# -- if some addresses fail the SMTP check using the RCPT TO: command then setting this property to false will abort sending the message
#    to any recipients valid or not
mail.smtp.sendpartial=true

贴出来几个发送邮件的服务,基本的一个是:

 <service name="sendMail" engine="java"
        location="org.ofbiz.common.email.EmailServices" invoke="sendMail">
        <description>Send E-Mail Service.  partyId and communicationEventId aren't used by sendMail
            but are passed down to storeEmailAsCommunication during the SECA chain.  See sendMailInterface for more comments.</description>
        <implements service="sendMailOnePartInterface"/>
    </service>

具体的代码需要自己慢慢研究了。。。



上一篇

已是最后文章

下一篇

已是最新文章

发表回复