zoukankan      html  css  js  c++  java
  • ofbiz 本地化及邮件设置126邮箱

    ofibz登陆功能有通过电子邮件找会密码的功能,但找回密码功能需要配置一个发送email的邮箱账号和smtp服务器的配置,具体配置如下:

    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.

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

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

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

    # -- SMTP Auth settings
    mail.smtp.auth.user=yanhuan0806----------------------(邮箱名称)
    mail.smtp.auth.password=yunhan0806------(邮箱密码)

    # -- 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=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=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=false

    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"/>

  • 相关阅读:
    [python]python学习笔记(七)——加密
    Android 实现ListView的A-Z字母排序和过滤搜索功能,实现汉字转成拼音 .
    Android 关于汉字转拼音的工具类Pinyin4jUtil 的使用说明
    20条技巧,让Chrome超越Firefox
    Android 内存优化
    WebView详解
    Android 获取手机通讯录信息 — 姓名和号码
    Android 获取手机通讯录信息 — 头像、姓名和A-Z的快速查询
    Android 快速开发框架AFinal
    Android 滑动改变视频音量和视频缩略图
  • 原文地址:https://www.cnblogs.com/Ivan-j2ee/p/3978274.html
Copyright © 2011-2022 走看看