more G-Labs products

Author Topic: mail notification not received  (Read 6692 times)

October 22, 2015, 07:16:04 PM
Reply #15

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Similar problem , but i didn't take a look at the log.
I use this :
Code: [Select]
// CSharp Automation Program : send an email to test the mail settings
var subject = "test email";
var messagetext = "HG Test Email";
var recipients = "########@gmail.com";
Net.SendMessage( recipients, subject, messagetext );

And it works better ... I don't search why ;)

October 23, 2015, 05:51:28 AM
Reply #16

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Well, I'm still stuck.

I used openssl to connect to smtp.mail.yahoo.com and manually send a test email...SUCCESS!  I had to use a app specific password, but that worked just fine.

I then tried to connect using HG and I don't get an indication that the password was used, so I believe that the issue I'm having is the error I posted earlier.  I tried using the same code that nolio posted, but it gives me the same error.  I know HG can send messages since it was working earlier this year, but it most definitely does not work today.

October 23, 2015, 09:32:44 PM
Reply #17

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Have you upgraded recently. I tested the email send notification on the RPI an hour ago and all seems fine.

October 23, 2015, 10:59:48 PM
Reply #18

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I'm on the current version of HG.  Unless you mean running update on the RPi, in which case I did that last week or so when I ran Gene's Linux commands to set up the certs.  I suppose I could back up my settings and reinstall HG just to make sure I have everything up to date.

October 26, 2015, 04:38:55 AM
Reply #19

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I updated to HG 498 and did not install my backup initially.  With the default setup, I updated the email setup APP to set up my yahoo!mail and added a new APP to perform a test email.  With this configuration, I get an error in the HG web log and no email.  I restored my backup and no change.

June 24, 2016, 10:41:50 AM
Reply #20

VuSaKe

  • *
  • Information
  • Newbie
  • Posts: 18
Hi,

I'm having trouble with the mail notification. I've got HG r525 updated from r522 and it doesn´t matter what email configuration i use i receive the following error:

"2016-06-24 10:32:25.5707 Error HomeAutomation.HomeGenie.Automation   NetHelper   530 5.7.0 Must issue a STARTTLS command first."
"   Exception.StackTrace     at System.Net.Mail.SmtpClient.SendCore (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0 "
  at System.Net.Mail.SmtpClient.SendInternal (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0
  at System.Net.Mail.SmtpClient.Send (System.Net.Mail.MailMessage message) [0x00000] in <filename unknown>:0


I´ve tried with gmail, yahoo and hotmail and always the same.

Searching in the forum i´ve found 2 possible solutions

sudo apt-get install ca-certificates-mono  --> the package doesn´t exist
----------------------------------------------
sudo apt-get install mono-devel
mozroots --import --ask-remove --machine
certmgr -ssl smtps://smtp.gmail.com:465

When executing "mozroots --import --ask-remove --machine" this is what i receive:

Mozilla Roots Importer - version 3.2.8.0
Download and import trusted root certificates from Mozilla's MXR.
Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed.

Downloading from 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1'...
Couldn't retrieve the file using the supplied information.


I´ve also tried to update mono after reading some posts in the forum, but homegenie starts to fail

Any ideas?

June 24, 2016, 10:51:10 AM
Reply #21

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
It's a bug in HG >= r522.
The fix is to place at line 230 of the NetHelper.cs class:

https://github.com/genielabs/HomeGenie/blob/master/HomeGenie/Automation/Scripting/NetHelper.cs#L230

Code: [Select]
                        if (spSmtpUseSsl != null && (spSmtpUseSsl.Value.ToLower() == "true" || spSmtpUseSsl.Value.ToLower() == "on" || spSmtpUseSsl.DecimalValue == 1))

I will make this fix available in the next release.

g.

June 24, 2016, 12:26:58 PM
Reply #22

VuSaKe

  • *
  • Information
  • Newbie
  • Posts: 18
Thanks for the quick answer :)

Is it a file a can modify easily? i couldn´t find it......  :-[

June 30, 2016, 06:39:33 PM
Reply #23

lfiocco

  • *
  • Information
  • Newbie
  • Posts: 16
does 525 have this fix. if not how do i fix it myself?

June 30, 2016, 09:28:44 PM
Reply #24

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
Just upgraded from 5.19 to 5.25 and email notification working fine

July 01, 2016, 02:22:45 AM
Reply #25

lfiocco

  • *
  • Information
  • Newbie
  • Posts: 16
i back tracked to 499, still no go. here is what i get

2016-06-30 20:15:56.2458 Info RaspberryPi.Gpio  GPIO26  Virtual Module  Status.Level    1
2016-06-30 20:15:56.3962 Info HomeAutomation.HomeGenie.Automation       90      Automation Program      HomeGenie.SecurityTriggered     1
2016-06-30 20:15:56.3973 Debug Event propagation halted by automation program 'Security Alarm System' (90) (Name=Status.Level, OldValue=1, NewValue=1)
2016-06-30 20:15:56.5107 Info WebServiceGateway 192.168.10.31   HTTP    GET     200 /api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.HomeGenie.Automation/90/
2016-06-30 20:15:57.2635 Error HomeAutomation.HomeGenie.Automation      NetHelper       Message could not be sent.      Exception.StackTrace      at System.Net.Mail.SmtpClient.Send (System.Net.Mai$
  at HomeGenie.Automation.Scripting.NetHelper.SendMessage (System.String from, System.String recipients, System.String subject, System.String messageText) [0x00000] in <filename unknown>:0
2016-06-30 20:15:58.7101 Info RaspberryPi.Gpio  GPIO26  Virtual Module  Status.Level    0
2016-06-30 20:15:59.6150 Info RaspberryPi.Gpio  GPIO26  Virtual Module  Status.Level    1

this gets triggered after gpio goes high.

i am using Gmail.
I have an IP camera, it also uses the same account and it works. i disabled the app program less security feature in google

did not realized this was going to be so hard to figure out. please help

January 10, 2017, 12:35:46 AM
Reply #26

petediscrete

  • ****
  • Information
  • Sr. Member
  • Posts: 220
I know its been a while since a reply was made on this post but a reference was made to rc525 not sending email.My email notifications stopped on the 10th December 2016.No changes were made to my setup in HG nor were updates made my Raspberry Pi running Raspbian Wheezy.I've tried everything I can possibly think of. I can send email to my Gmail account via a terminal session using SSMTP so I know the client is working and all the relevant updated certificates are in order.

I can see no changes that were made by Google that may cause this problem.HG is reporting that mail was sent but I receive nothing.

Would anyone have any further suggestions that may help here.

January 10, 2017, 05:06:20 PM
Reply #27

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I never got gmail working after google changed things a year or two back.  I have been using yahoo and it works fine.  I just tested and my email is working correctly as of now.

I am running r501 now (I had 519 but a restore took me back to 501 apparently).  I haven't updated anything email related since I published the RPi tutorial linked earlier in this thread.

January 10, 2017, 09:01:37 PM
Reply #28

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544

January 11, 2017, 01:07:24 AM
Reply #29

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Yahoo requires an app specific password if it doesn't have the built-in security certificates or whatever.  Sounds like gmail is the same way.  If you can do that, it should work (assuming it's the same idea as yahoo mail).