ofbiz 本地化及郵件設置126郵箱

ofibz登錄功能有經過電子郵件找會密碼的功能,但找回密碼功能須要配置一個發送email的郵箱帳號和smtp服務器的配置,具體配置以下:java

1:在ofbiz數據庫的表product_store_email_setting中找到from_address字段,將該字段中值所有修改爲配置的默認發送帳號數據庫

 

2:在general.properties中配置smtp參數服務器

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

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

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

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

# -- SMTP Auth settings
mail.smtp.auth.user=yanhuan0806----------------------(郵箱名稱)
mail.smtp.auth.password=yunhan0806------(郵箱密碼)ui

# -- 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=25
# -- Gmail requires StartTLS
mail.smtp.starttls.enable=truethis

# -- 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=25
#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=falseurl

3:配置完成後須要重啓ofbiz,配置才能生效,再次登陸找回密碼就能收到一封郵件

  

 

注意:

Ecommerce 模塊中 發出郵件部分,須要修改一下部份內容:

文件路徑: applications/securityext/data/UserDemoData.xml

<EmailTemplateSetting emailTemplateSettingId="EMAIL_PASSWORD" subject="New Password Sent (${userLoginId})" fromAddress="ofbiztest@example.com"

        description="Used to send a new password at user request"/>

改成:

<EmailTemplateSetting emailTemplateSettingId="EMAIL_PASSWORD" subject="New Password Sent (${userLoginId})" fromAddress="yanhuan0806@126.com"

        description="Used to send a new password at user request"/>

相關文章
相關標籤/搜索