more G-Labs products

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

February 19, 2017, 08:00:00 PM
Read 2864 times

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
Use HG 5.25 on a raspberry.
A great program. Unfortunately, I do not send emails.
Does anyone have experience on this subject? I use my "web.de" account.
On my main computer runs "Outlook" (Office) perfectly.
Also a small test program (Send_Test_e-mail.hgx) does not send mail.
Many Thanks.

Thoralf

February 19, 2017, 08:32:07 PM
Reply #1

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Hi, pinie_pinie.
Have you installed ca-certificates-mono package?
Also, try to use 25 port for SMTP server settings.

February 20, 2017, 04:45:28 PM
Reply #2

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
no I did not.
The link in the guide does not work.
"sudo apt-get install ca-certificates-mono"

Do you have a tip where I can load the package?

Many Thanks!!!

Thoralf

February 20, 2017, 04:49:16 PM
Reply #3

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Take a look at official Mono documentation: http://www.mono-project.com/docs/getting-started/install/linux/
You need to execute these 3 steps before installing ca-certificates-mono:
Code: [Select]
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update

February 20, 2017, 06:49:34 PM
Reply #4

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
Has done everything.
The package I could now also install (ca-certificates-mono)

But now HG does not start anymore. The Raspberry is accessible via SSH and remote.
Have HG re-installed.
Unfortunately without success.

Many Thanks!!!

Thoralf

February 20, 2017, 08:02:24 PM
Reply #5

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Hm, it's strange.
Could you try to run HG directly from the console? Go to HG installation folder and run
Quote
mono HomeGenie.exe
Attach here console output. It should contain useful information.

Edit: also you can try to connect to your HG on port 8080.

February 20, 2017, 08:17:28 PM
Reply #6

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
Now runs HG.
I have sudo apt-get update + sudo apt-get upgrade done.
After a reboot I reached HG.

Unfortunately, email still does not work (port 25 or port 587).
Do you have a good idea?

Thoralf

February 20, 2017, 08:32:42 PM
Reply #7

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Glad to hear that your HG is now working.
To investigate email problems I can only advise you to try to use my binaries with extended tracing around sending emails.
- stop HG
- backup your HomeGenie.exe and Linux.dll files
- replace them with attached files
- edit your NLog.config file like this:
Code: [Select]
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <targets>
     <target name="debugger" xsi:type="Console" layout="${longdate} ${level} ${message}"/>
     <target name="logfile" xsi:type="File" fileName="${basedir}/log/${level}.log" />
  </targets>

  <rules>
    <logger name="*" minlevel="Trace" writeTo="debugger" />
    <logger name="*" minlevel="Trace" writeTo="logfile" />
  </rules>
</nlog>
- start HG

After that in your log folder you will see Trace.log file where you will find some strings with HomeGenie.Automation.Scripting.NetHelper. They contain info about the process of sending emails. Be careful before posting these logs here as they will contain your password in plain text.

February 20, 2017, 08:36:31 PM
Reply #8

pinie_pinie

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

I will definitely try it. Must now go to work. Report me tomorrow and share the result.
Many Thanks.

Thoralf

February 21, 2017, 11:55:36 AM
Reply #9

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
The files exchanged. Unfortunately without success.
In the appendix you find the "Trace.log".
Note: I have set the "SSL" checkmark in the "email account". Is the error in the program?
No mails are sent. The small help program "Test e-mail" has not brought any error messages since the exchange of the files. The mail is still not sent.
Many Thanks.

Thoralf

February 21, 2017, 12:57:11 PM
Reply #10

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Well, there is a string "Error sending email {0}" and it's good, as you can search for actual error in Error.log.
When I have had problems with sending emails there was no error, Send function just stuck.

Also, I definitely have to remove "Domain": "bounz.net" I've used while investigating my own email problems. I'll post corrected binaries today evening.

About "SSL" checkmark in the "email account": I have set it up and it has been successfully saved. Have you pressed "Reload" (something like that) button in the popup with email settings?

February 21, 2017, 01:41:52 PM
Reply #11

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
I'll send you my "error-log". There are a lot of errors about "Mail / SSL". Can not evaluate them unfortunately. Can you see where the error could be?
Many Thanks.

Thoralf

February 21, 2017, 01:53:26 PM
Reply #12

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Well, I think problem definitely is in sending email without SSL.
You should try to save the "Use SSL" checkbox in email settings of HG.

February 21, 2017, 02:25:54 PM
Reply #13

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
That was my first intention. I think the program does not save. Therefore my login is probably rejected (SSL required).
But what can I do with this problem? Can you give me the "E-Mail Account.hgx"
Send, or does that make no sense?
Many Thanks.

Thoralf

February 21, 2017, 02:50:08 PM
Reply #14

pinie_pinie

  • ***
  • Information
  • Full Member
  • Posts: 55
Hello,
The problem sits in front of the calculator !!!!
My Raspberry had the wrong time zone (1h back). You have to come up with that.
Now runs the e-mail program without problems !!!!

Thank you very much for your support !!!!
I learned a lot.

Thoralf