more G-Labs products

Author Topic: Sending email with HG 5.25 ???  (Read 2864 times)

March 10, 2017, 08:55:01 PM
Reply #30

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Settings are written into modules.xml file.
You can search the file for 'E-Mail Account' program. But the values of properties are encoded.

March 10, 2017, 09:36:29 PM
Reply #31

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Also, please try to use attached binaries and NLog.config to log more information about the exception and after that attach Trace.log file.

Do not forget to backup yours before replacing files.

March 11, 2017, 12:36:09 PM
Reply #32

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,

Where can I find the file "modules.xml"?
I have managed HG 5.25 with working email sending. I do not know why.
Then I tried to create a new SD card with HG5.25. I have everything
Made equal (HG5.25 + mono + Account) The email sending does not work !!!!
I can not understand why it is so difficult. I have the procedure determined already 20x repeatedly. Unfortunately without success. In my view, the email sending does not work stable, otherwise I could repeat the process without problems.

Thanks for your help!!!
Thoralf

March 11, 2017, 02:55:44 PM
Reply #33

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
"modules.xml" file is in the root of your HG installation directory (at the same directory where HomeGenie.exe resides).

For simplifying testing email settings I wrote a little test program. Run it with
Code: [Select]
mono EmailTester.exeThe program uses the same method to send emails as HG does.

March 11, 2017, 03:41:32 PM
Reply #34

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,

Now we are on the right track. I'm missing something. Your program runs on the old SD card (mail sending o.k)
On the new SD card is missing in the "mono" directory.
How do I get the missing post-installed?

Many Thanks!!!

Thoralf

March 11, 2017, 04:50:06 PM
Reply #35

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94

March 12, 2017, 10:19:42 AM
Reply #36

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,

I can start the program. But get an error message.
On the old SD card the program works without problems.

So the error must be outside HG?

Many Thanks.

Thoralf

March 12, 2017, 10:31:54 AM
Reply #37

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Well, Thoralf, something is wrong with your mono installation on the new SD card.
Are you sure you have installed ca-certificates-mono package?
Quote
The .NET Framework on Windows uses the Windows Certificates store (mmc, Add/Remove Snap-Ins, Certificates) to determine whether to accept an SSL certificate from a remote site. Windows ships with a bunch of Root and Intermediate Certificate Authorities (CA) and they get updated periodically by Windows Update. As a result, your .NET code will generally trust a certificate provided it was issued by a CA or a descendant of a CA in the certificate store (most reputable commercial CA's are included).

In Mono, there is no Windows Certificate store. Mono has it's own store. By default, it is empty (there are no default CA's that are trusted). You need to manage the entries yourself.

Take a look at http://www.mono-project.com/docs/faq/security/ page, there are 4 methods described how to import SSL certificates into Mono certificate store.
But normally all these root certificated should be installed during Mono installation.

P.S. There is also an option to disable SSL certificate validation in code, but this is very bad practice.

March 12, 2017, 01:02:40 PM
Reply #38

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,

Of course. Have tried again to install. A reinstallation is made, which already has the latest version installed.
Can you uninstall "ca-certificates-Mono"?
Then I would reinstall "mono" completely.
I have already done several times, but something runs during the installation not clean.

Many Thanks!

Thoralf

March 12, 2017, 10:02:12 PM
Reply #39

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,

I have reinstalled the SD card completely. Have only Rasbian jessie installed.
Then mono-complete and ca-certificates-mono package.
The program EmailTester works without problems. I was very confident.
Then I installed HG 5.25 and configured.
Unfortunately the email sending still does not work.
Is the sequence important when installing mono? Does anyone have an accurate
Instructions for the installation (Step by Step) of mono + ca-certicates-mono package?

Many Thanks

Thoralf

March 13, 2017, 04:17:33 PM
Reply #40

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
The guide I posted is exactly the commands I used to set up my RPi with Jessie last month.  I used Nov 2016 so newer Jessie could alter things possibly.  The only thing I can think of is that you are getting a different version of some package than the rest of us (different mirrors of the repository or something).  Perhaps you could check that the version numbers make sense?  I'm not sure what else to suggest since I provided my exact steps to get a working email setup.  Since we know it's outside of HG at this point, restoring HG settings should be a non-issue and that was the only difference I can think of right now.

March 13, 2017, 07:06:57 PM
Reply #41

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Quote
Then I installed HG 5.25 and configured.
Unfortunately the email sending still does not work.

Email sending in HG or in EmailTester?
How do you install HG? Using .deb package or .zip archive?

March 13, 2017, 10:02:27 PM
Reply #42

yoker77

  • *
  • Information
  • Newbie
  • Posts: 2
It works!!!

Hi,
i has been working together with Thoralf on this problem. Today we have been found the solution. The Solution could be found thanks to your help. Tomorrow we will send the the sequence of the installation, which leads reproducibly and safely to the target.

Many thanks at Bounz and bkenobi.

A question to Bounz: What is the function is of homegenie.exe. What is the difference between your homegenie.exe and the original?
« Last Edit: March 14, 2017, 05:59:05 AM by yoker77 »

March 14, 2017, 06:06:27 AM
Reply #43

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
The function of Homegenie.exe is to provide to user web interface and automation capabilities like Scheduler, Program runner, helper classes (like Module Helper, Network Helper) and so on.
You can see the differences between my version and Gene's version r525 on this pull request on GitHub: https://github.com/genielabs/HomeGenie/pull/308 (commit messages are more or less descriptive).

March 14, 2017, 07:45:15 AM
Reply #44

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,

As already announced HG 5.25 the email shipping works!
In the annex a small guide for beginners. It has resulted from numerous experiments and combinations.
The key point is the exchange of "Homegenie.exe" (Bounz).
Thanks to all for their support!!!

Thoralf