more G-Labs products

Author Topic: gmail SendMessage  (Read 1858 times)

June 05, 2015, 07:15:08 AM
Read 1858 times

byteman

  • *
  • Information
  • Newbie
  • Posts: 19
Running HG on a Raspberry Pi B+
Trying to test gmail SendMessage

Settings:
Email Address: <myemail>@gmail.com
SMTP Mail Server Address: smtp.gmail.com
SMTP username (optional):<myemail>@gmail.com
SMTP password (optional):************
SMTP Mail Server port: 587
SMTP Mail Server use SSL (TRUE or FALSE): TRUE

Created a c# test program with the following line:
Code: [Select]
Net.SendMessage("<myemail>@gmail.com", "Subject here", "This is the message text." );Compiled and selected: Action / Run

...and I get nothing.  If I trap for an error, there is no exception.  SendMessage returns "False".  I've searched through the forum and my gmail setup seems to be consistent with what I see in the forum.

Any suggestions would be appreciated.

June 05, 2015, 01:20:26 PM
Reply #1

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330

You mentioned searching forum, but I'll point to this thread, maybe it can help:
  http://www.homegenie.it/forum/index.php?topic=223.msg1911#msg1911

You have the port that seems to be best.  Other than that, try removing "@gmail.com" from the username.

June 05, 2015, 03:03:48 PM
Reply #2

byteman

  • *
  • Information
  • Newbie
  • Posts: 19
Yes, I tried the "username" both ways (with and without the "@gmail".  Net.SendMessage returns False for either way.

June 05, 2015, 04:53:56 PM
Reply #3

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I struggled with setting up both gmail and Yahoo mail initially.  I believe in the end I had to set up something on the Yahoo mail server to allow for the RPi to connect.  I never got gmail to work reliably (if at all).

June 05, 2015, 04:56:14 PM
Reply #4

byteman

  • *
  • Information
  • Newbie
  • Posts: 19
Thanks - as I understand it, you must have a "paid" yahoo account ($19 per year) to use their smpt service remotely - is that your understanding?

June 05, 2015, 05:42:02 PM
Reply #5

kevin1

  • *****
  • Information
  • Hero Member
  • Posts: 330
I have free yahoo mail and use it with HG.  I paid for it in the past, but not now.  I suspect with popularity of iphone/smartphone they made smtp access available for free.

June 05, 2015, 06:17:05 PM
Reply #6

byteman

  • *
  • Information
  • Newbie
  • Posts: 19
I can send email using my gmail account from the command line on my raspberry pi after setting up the ssmtp.conf file for gmail using the "mail" command.

But when I change the ssmtp.conf settings to use my yahoo account, it doesn't work.  Can't find any setting in yahoo.mail to make this work.

Thinking this shouldn't be so hard!

June 06, 2015, 12:33:56 AM
Reply #7

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I have never paid for yahoo or gmail.  I do not have a .conf file setup.  I did struggle with this for a couple weeks off and on.  I think the best info was provided by google.  This is the page I used for settings IIRC.

http://email.about.com/od/accessingyahoomail/f/Yahoo_Mail_SMTP_Settings.htm

June 06, 2015, 05:22:51 AM
Reply #8

byteman

  • *
  • Information
  • Newbie
  • Posts: 19
OK, I gave up on Yahoo.  Found this post:

[url=http://www.homegenie.it/forum/index.php?topic=466.msg2682#msg2682]http://www.homegenie.it/forum/index.php?topic=466.msg2682#msg2682
[/url]

Followed those instructions, restarted HG, and now gmail is working.

Thanks all for you help.