Hi Schumann

Are you behind a web proxy or have internet access from the machine you have 
ofbiz installed on? It either looks like the system properties are not 
configured correctly/being picked up. Or you have no direct access to office365 
smtp server

The hint is the connection error you stated in your first email, can provide a 
stacktrace from runtime/logs/ofbiz.log?


Gareth Carter


Software Development Analyst


Stannah Management Services Ltd


IT Department


Ext:


7036


DDI:


01264 364311




[http://logos.stannah.co.uk/stan150.jpg]


[http://logos.stannah.co.uk/enviro.jpg]Please consider the environment before 
printing this email.

From: Schumann Ye [mailto:schumanny...@hotmail.com]
Sent: 18 March 2018 1:53 PM
To: user@ofbiz.apache.org
Cc: arunpati...@apache.org
Subject: 答复: About OFBiz Email Passwords Sending

Dear Jacques, Michael, Arun, Suraj,

I spent some time and tried to understand where went wrong. Here below is what 
is in my mind:

1. All the main pre-defined parameters related to this topic like 
“mail.smtp.relay.host<http://mail.smtp.relay.host>” is stored in the file 
“general.properties”;

2. Once the release is installed, those parameters are read into the database 
(in my case is MySQL) table “ofbiz.system_property”;

3. For my case, I have changed both the parameters in the file 
“general.properties” and the database table “ofbiz.system_property”, along with 
all other parameters like email address in my previous posted email;

4. However, what the error messages “Unable to email password” (after googling 
it) might mean something wrong with the SSL. For my case, the SSL certificate 
“framework/base/config/ofbizssl.jks” provided in the release 16.11.03 (my case) 
is not working here;

So the options left for me is either to install the proper SSL certificate or 
change the settings (and hopefully it would work);



4.1 for option 1: I have successfully applied one SSL certificate from Symantec 
(with suffix ****.jks) from my website service provider and the certificate is 
valid for 1 year. I copied it to the folder “framework/base/config” and then in 
the file “framework/catalina/ofbiz-component.xml” and then I modified the 
following fields of the property “https-connector”:

From (originally)

<property name="keystoreFile" value="framework/base/config/ofbizssl.jks"/>

<property name="keystoreType" value="JKS"/>

<property name="keyAlias" value="ofbiz"/>

<property name="keyPass" value="changeit"/>

<property name="sslProtocol" value="TLS"/>

To

<property name="keystoreFile" value="framework/base/config/****.jks"/>

<property name="keystoreType" value="JKS"/>

<property name="keyAlias" value="ofbiz"/>(I leave it as ofbiz because I don’t 
know what to fill in here)

<property name="keyPass" value="changeit"/> (I tried many options but all 
failed by leaving it unchanged or changed it to the password that I set as 1234 
when downloading the JKS file)

<property name="sslProtocol" value="TLS"/>

Unfortunately after changing it, I could even not get in the login webpage and 
something is wrong with the certificate validation, I guess.

So my another question is: is there any guide book showing us how to install 
the SSL.

BTW, I tried the link below and I simply could not get it done.

https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide<https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide>



4.2 So I had to change the following setting both mentioned in Item Nr.1 and 
Nr2.

From (originally)

#--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=true
To

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


After rebooting, strange thing happened. It prompted me with something like 
“could not send email from 
myfakeemailaddr...@outlook.com<mailto:myfakeemailaddr...@outlook.com<mailto:myfakeemailaddr...@outlook.com%3cmailto:myfakeemailaddr...@outlook.com>>
 to 
myfakeemailaddr...@outlook.com<mailto:myfakeemailaddr...@outlook.com<mailto:myfakeemailaddr...@outlook.com%3cmailto:myfakeemailaddr...@outlook.com>>.

Obviously this is not the case because I had set the recipient’s email address 
differently.

5. When I almost gave up, I changed last time with the following:

From (originally)

mail.smtp.auth.user=myfakeemailaddress
mail.smtp.socketFactory.fallback=false

To

mail.smtp.auth.user=myfakeemailaddr...@outlook.com<mailto:mail.smtp.auth.user=myfakeemailaddr...@outlook.com>
mail.smtp.socketFactory.fallback=true



This is where and when magic happened. I finally received the GD message.

And I swear to GOD that I used the last working combination before and it 
didn’t work.



Now to me it still is a mystery why and how it worked.

I write this out and hope it would help someone out there struggling like me 
and would highly appreciate if anyone would guide me clearly (step-by-step) how 
to make my SSL work for my website.
Have a nice day to all your guys!

Schumann
+86-1800-150-1800

发件人: Arun Patidar<mailto:arun.pati...@hotwaxsystems.com>
发送时间: 2018年3月16日 16:42
收件人: 
user@ofbiz.apache.org<mailto:user@ofbiz.apache.org<mailto:user@ofbiz.apache.org%3cmailto:user@ofbiz.apache.org>>
抄送: 
arunpati...@apache.org<mailto:arunpati...@apache.org<mailto:arunpati...@apache.org%3cmailto:arunpati...@apache.org>>
主题: Re: About OFBiz Email Passwords Sending

Hello Jacques,

There are still some occurrences in the code for systemPropertyValue="".
This empty field should be removed to prevent data overridden. Added an
example data in the ticket OFBIZ-10282





--
Thanks & Regards
---
Arun Patidar
Manager, Enterprise Software Development

www.hotwaxsystems.comwww.hotwax.co<http://www.hotwaxsystems.comwww.hotwax.co><http://www.hotwaxsystems.comwww.hotwax.co<http://www.hotwaxsystems.comwww.hotwax.co>>


On Fri, Mar 16, 2018 at 12:49 AM, Jacques Le Roux <
jacques.le.r...@les7arts.com<mailto:jacques.le.r...@les7arts.com>> wrote:

> Sorry missed to say that it's on the dev ML
>
> Jacques
>
>
>
> Le 15/03/2018 à 18:28, Jacques Le Roux a écrit :
>
>> Hi Suraj,
>>
>> Before diving in this action, could you please check the thread
>> "Deprecate properties in favour of SystemProperties"
>>
>> Notably 
>> https://markmail.org/message/opldepaevls3y3ob<https://markmail.org/message/opldepaevls3y3ob>
>>
>> Thanks
>>
>> Jacques
>>
>>
>> Le 15/03/2018 à 12:53, Suraj Khurana a écrit :
>>
>>> Hi Michael, Schumann,
>>>
>>> As per some recent code changes, there are many empty fields in data
>>> files
>>> which removes the data when some reader is again loaded into the system.
>>> Lets say I configured some email settings and mistakenly if ext reader is
>>> loaded again, that data will be corrupted and user is unaware of that.
>>>
>>> This ticket is created for changes regarding the same:
>>> https://issues.apache.org/jira/browse/OFBIZ-10282<https://issues.apache.org/jira/browse/OFBIZ-10282>
>>>
>>> HTH.
>>>
>>> --
>>> Thanks and Regards,
>>> *Suraj Khurana* | Sr. Enterprise Software Engineer
>>> HotWax Commerce by HotWax Systems
>>> Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Mar 15, 2018 at 4:14 PM, Michael Brohl <michael.br...@ecomify.de
<mailto:michael.br...@ecomify.de%0b>>>> >
>>> wrote:
>>>
>>> Hi Schumann,
>>>>
>>>> please have a look at the SystemProperty table. Currently the demo data
>>>> loads some configuration for email so the changes in general.properties
>>>> are
>>>> partly overwritten in the configuration logic. Either change the
>>>> database
>>>> entries or remove them to use general.properties settings.
>>>>
>>>> Best regards,
>>>>
>>>> Michael Brohl
>>>> ecomify GmbH
>>>> www.ecomify.de<http://www.ecomify.de><http://www.ecomify.de<http://www.ecomify.de>>
>>>>
>>>>
>>>> Am 15.03.18 um 10:20 schrieb Schumann Ye:
>>>>
>>>> Dear Gurus,
>>>>
>>>>> When I try to activate OFBiz Passwords Forget (Email Passwords
>>>>> function)
>>>>> in the Login webpage, I have got the following Error message:
>>>>>
>>>>> The Following Errors Occurred:
>>>>> Error occurred: unable to email password. Please try again later or
>>>>> contact customer service. (error was: [CON] Connection error when
>>>>> sending
>>>>> message to 
>>>>> ***************@hotmail.com<mailto:***************@hotmail.com> from 
>>>>> ****************@
>>>>> outlook.com
>>>>> cc bcc subject New Password Sent (my own user login id)).
>>>>>
>>>>> What I have done in customizing the OFBiz Email Passwords is as
>>>>> follows:
>>>>>
>>>>> 1. Update the fields (which are not null) From_Address, CC_Address
>>>>> and BCC_Address from tables ofbiz.product_store_email_setting and
>>>>> ofbiz.email_template_setting to sending email address
>>>>> ******************@
>>>>> outlook.com
>>>>>
>>>>> 2. Modify the file general.properties as follows:
>>>>> # -- general default 'fromEmailAddress' can be overridden in:
>>>>> EmailTemplateSetting
>>>>> defaultFromEmailAddress=******************@outlook.com<mailto:defaultFromEmailAddress=******************@outlook.com>
>>>>>
>>>>> # -- 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.office365.com
>>>>>
>>>>> # -- SMTP Auth settings
>>>>> mail.smtp.auth.user=******************(my outlook mail name with
>>>>> the @outlook.com)
>>>>> mail.smtp.auth.password=*******************(my outlook mailbox
>>>>> passwords)
>>>>>
>>>>> # -- 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=587
>>>>> # -- 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=587
>>>>> #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. Update the predefined fields from table ofbiz.system_property
>>>>> in
>>>>> mysql database as above shown in point 2.
>>>>> 4. I also update the from_address from the preset mailbox to my
>>>>> outlook mailbox in the moduel Ecommerce (applications/securityext/data
>>>>> /UserDemoData.xml),
>>>>> although this is not necessary for now because I am using back-end
>>>>> only.
>>>>>
>>>>> After a successful reboot of OFBiz, I got the error message shown in
>>>>> the
>>>>> very beginning.
>>>>>
>>>>> Can anybody help?
>>>>> Thanks and have a nice day!
>>>>>
>>>>> Best Regards
>>>>> Schumann
>>>>> +86-1800-150-1800
>>>>>
>>>>>
>>>>>
>>>>
>>
>>
>

This email is intended only for the above addressee. It may contain privileged 
information. If you are not the addressee you must not copy, distribute, 
disclose or use any of the information in it. If you have received it in error, 
please delete it and notify the sender.

Stannah Lift Holdings Ltd registered No. 686996, Stannah Management Services 
Ltd registered No. 2483693, Stannah Lift Services Ltd registered No. 1189799, 
Stannah Microlifts Ltd registered No. 964804, Stannah Lifts Ltd registered No. 
1189836, Stannah Stairlifts Ltd registered No. 1401451, Global Upholstery 
Solutions Ltd registered No. 02452728.

All registered offices at Watt Close, East Portway, Andover, Hampshire, SP10 
3SD, England.

All Registered in England and Wales.

Reply via email to