Home AMX User Forum NetLinx Studio
Options

smtp accounts

Trying to figure out of how to use the new smtp keywords linked up with a gmail account.

Finding old treads about gmail is not useable bla,bla,bla...

Anyone tried it for sending emails directly from netlinx?
Any reson gmail shouldnt work?
Any tip about another provider i could try?

vfemail didnt help me as it gave me another errror... TLS not supported by server/even i turned it off

Comments

  • Options
    viningvining Posts: 4,368
    kennethk wrote: »
    Trying to figure out of how to use the new smtp keywords linked up with a gmail account.

    Finding old treads about gmail is not useable bla,bla,bla...

    Anyone tried it for sending emails directly from netlinx?
    Any reson gmail shouldnt work?
    Any tip about another provider i could try?

    vfemail didnt help me as it gave me another errror... TLS not supported by server/even i turned it off
    I've never tried this using the new supported keywords but based on a quick google search for GMAIL smpt port I would try this config:
    SMTP_SERVER_CONFIG_SET(SMTP_ADDRESS,'smtp.gmail.com')
    
         SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER,'587')//TLS/STARTTLS: 587, SSL = 465
    
         SMTP_SERVER_CONFIG_SET(SMTP_USERNAME,'username@gmail.com')
    
         SMTP_SERVER_CONFIG_SET(SMTP_PASSWORD,'your Gmail password')
    
         SMTP_SERVER_CONFIG_SET(SMTP_FROM,'username@gmail.com')
    
         SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS,SMTP_TLS_TRUE)
    
    What port and smtp address were you trying. Maybe post your configs and someone can help.
  • Options
    I have tested smtp.gmail.com with both port number suggested:

    See settings and responses in diagnostics:
    AND, when using port 587, i get an error (see respons, line 16), but doesnt appear when using port 465

    SMTP_SERVER_CONFIG_SET(SMTP_ADDRESS,'smtp.gmail.com')

    SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER,'587')

    SMTP_SERVER_CONFIG_SET(SMTP_USERNAME,'casakennybenny@gmail.com')

    SMTP_SERVER_CONFIG_SET(SMTP_PASSWORD,'xxxx') //xxxx=my correct password with this account

    SMTP_SERVER_CONFIG_SET(SMTP_FROM,'casakennybenny@gmail.com')

    SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS,SMTP_TLS_TRUE)


    Respons in diag after issued the smtp_send() to adress mentioned in the respons

    Line 1 (21:42:28):: CIpLibrary::Mail_SmtpSend - sending TO: kenneth.karlberg@gmail.com
    Line 2 (21:42:28):: MailService enqueuing id#1 @ 0:3:2
    Line 3 (21:42:28):: MailServiceEventHandler sending id#1
    Line 4 (21:42:28):: >> mime write: part_write start
    Line 5 (21:42:28):: >> mime write: part_write sw-MSG start
    Line 6 (21:42:28):: >> mime write: part_write start
    Line 7 (21:42:28):: >> mime write: part_write sw-SINGLE start
    Line 8 (21:42:28):: >> mime write: Quoted printable
    Line 9 (21:42:28):: >> mime write: part_write sw-SINGLE end
    Line 10 (21:42:28):: >> mime write: part_write end
    Line 11 (21:42:28):: >> mime write: part_write sw-MSG end
    Line 12 (21:42:28):: >> mime write: part_write end
    Line 13 (21:42:28):: email 1 sendt
    Line 14 (21:42:29):: Memory Available = 33674040 <92880>
    Line 15 (21:42:29):: Memory Available = 33659104 <14936>
    Line 16 (21:42:29):: MailSenderPrivate::Send authentication error 4 (Unknown error code)
    Line 17 (21:42:29):: MailServiceEventHandler::sendErrorEvent id#1 0:3:2 (4)
    Line 18 (21:42:29):: CIpEvent::OnError 0:3:2


    //////////////////// New test /////////////////////////////

    SMTP_SERVER_CONFIG_SET(SMTP_ADDRESS,'smtp.gmail.com')

    SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER,'465')

    SMTP_SERVER_CONFIG_SET(SMTP_USERNAME,'casakennybenny@gmail.com')

    SMTP_SERVER_CONFIG_SET(SMTP_PASSWORD,'xxxx')

    SMTP_SERVER_CONFIG_SET(SMTP_FROM,'casakennybenny@gmail.com')

    SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS,SMTP_TLS_TRUE)

    Respons in diag

    Line 1 (21:48:34):: CIpLibrary::Mail_SmtpSend - sending TO: kenneth.karlberg@gmail.com
    Line 2 (21:48:34):: MailService enqueuing id#1 @ 0:3:2
    Line 3 (21:48:34):: MailServiceEventHandler sending id#1
    Line 4 (21:48:34):: >> mime write: part_write start
    Line 5 (21:48:34):: >> mime write: part_write sw-MSG start
    Line 6 (21:48:34):: >> mime write: part_write start
    Line 7 (21:48:34):: >> mime write: part_write sw-SINGLE start
    Line 8 (21:48:34):: >> mime write: Quoted printable
    Line 9 (21:48:34):: >> mime write: part_write sw-SINGLE end
    Line 10 (21:48:34):: >> mime write: part_write end
    Line 11 (21:48:34):: >> mime write: part_write sw-MSG end
    Line 12 (21:48:34):: >> mime write: part_write end
    Line 13 (21:48:34):: email 1 sendt
    Line 14 (21:48:34):: Memory Available = 33590760 <10328>
    Line 15 (21:48:34):: Memory Available = 33572768 <17992>
    Line 16 (21:49:41):: Memory Available = 33267288 <305480>
  • Options
    the8thstthe8thst Posts: 470
    Have you double checked to make sure POP3 access is turned on in your gmail settings?
  • Options
    The only thing i can find in settings on my gmail account regarding POP3 is for "import" another e-mail account ( yahoo, hotmail...) into my gmail account.

    POP3 is necessary to receive e-mails, but i only need to send (from my Netlinx)...
    Cant find anything regarding POP in the new Netlinx keywords??
    Only SMTP...

    Is there something about this i dont get?

    But to answer your question...
    POP is activated (doesnt say pop3) and IMAP which i beleive is the one i need to be able to send emails from my netlinx on behalf of my gmail account...

    I already have my iPhone setup with gmail, and i can both send and receive so shouldnt this confirm my account is ok?
    For POP to function i need to use another server aswell.

    Havent tried this one
    POP.gmail.com
    Port:995
    SSL neccessary

    Only tried this one.
    smtp.gmail.com
    Port for TLS:587 //This should be the right port for TLS
    Port to ssl:465 //But have also tried with this one
  • Options
    the8thstthe8thst Posts: 470
    You are correct in that POP and IMAP are for fetching incoming mail, but google also makes you enable POP or IMAP before you can log into the SMTP server to send mail from an external email client.

    Those settings should be fine since you can send mail from your phone.

    I haven't played with email via netlinx since AMX added SSL/TLS support, so I can't be of anymore help. Sorry.
  • Options
    thanks anyway :)

    I found this old thread by JJAMES
    http://www.amxforums.com/showthread.php?3895-Yet-Another-Email-Thread&highlight=smtp

    Why is gmail out of the question??
  • Options
    the8thstthe8thst Posts: 470
    gmail requires SSL or TLS, which AMX didn't support.
  • Options
    Hmm...

    Wondering about that...

    Is SSL replaced by tls, or are they still depending on each other?

    -Im thinking i need to set up the ssl port in the web interface(Master server options) in addition to use these new keywords?

    -And then i need to create certificates??

    -And now this is WAY over my league :(

    Or am i overreacting?
  • Options
    kennethk wrote: »
    The only thing i can find in settings on my gmail account regarding POP3 is for "import" another e-mail account ( yahoo, hotmail...) into my gmail account.

    Sounds like you're on the "Accounts and Import" tab. Enabling/Disabling POP in gmail is under "Forwarding and POP/IMAP" (see attached image)

    Also, according to this Gmail support article, the IMAP settings are as follows:
    Incoming Mail (IMAP) Server - Requires SSL
       imap.gmail.com
       Port: 993
       Requires SSL:Yes
    Outgoing Mail (SMTP) Server - Requires TLS
       smtp.gmail.com
       Port: 465 or 587
       Requires SSL: Yes
       Requires authentication: Yes
       Use same settings as incoming mail server
    Full Name or Display Name: [your name]
    Account Name or User Name: your full Gmail address (username@gmail.com). Google Apps users, please enter username@your_domain.com
    Email address: your full Gmail address (username@gmail.com) Google Apps users, please enter username@your_domain.com
    Password: your Gmail password
    

  • Options
    I did enable POP.
    Works from iPhone...

    And i did set up the smtp server...
    Tried both port 587 and 465...

    Just tried switch out smtp with imap.gmail.com Port 993, but that didnt work either...

    Can this be an issue with my firewall?

    Or maybe gmail requires both the smtp AND imap settings??
    I cant see how this is possible with the new keywords...
  • Options
    viningvining Posts: 4,368
    I don't know why you'd need to do anything with your POP setting to get SMTP going.

    I've been playing with these commands with a known working account and I haven't been able to send either.

    My configs:
    SMTP_SERVER_CONFIG_SET(SMTP_ADDRESS,'smtp.comcast.net');
    
         SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER,'587');
    
         SMTP_SERVER_CONFIG_SET(SMTP_USERNAME,'daniel_vining');//also tried the email account but i!-EquipmentMonitorOut uses this with the password
    
         SMTP_SERVER_CONFIG_SET(SMTP_PASSWORD,'****************');
    
         SMTP_SERVER_CONFIG_SET(SMTP_FROM,'ViningAudioVideo@comcast.net');
    
         SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS,SMTP_TLS_TRUE);
    
    Here's my sending and I also call the GET functions to verify settings
    SEND_STRING 0, "'dvSmtpSock_2, CURRENT_ADDRESS-[ ',SMTP_SERVER_CONFIG_GET(SMTP_ADDRESS),' ] <',ITOA(__LINE__),'>'";
    SEND_STRING 0, "'dvSmtpSock_2, CURRENT_PORT-[ ',SMTP_SERVER_CONFIG_GET(SMTP_PORT_NUMBER),' ] <',ITOA(__LINE__),'>'";
    SEND_STRING 0, "'dvSmtpSock_2, CURRENT_FROM-[ ',SMTP_SERVER_CONFIG_GET(SMTP_FROM),' ] <',ITOA(__LINE__),'>'";
    SEND_STRING 0, "'dvSmtpSock_2, CURRENT_TLS-[ ',SMTP_SERVER_CONFIG_GET(SMTP_REQUIRE_TLS),' ] <',ITOA(__LINE__),'>'";
    	       
    nResult = SMTP_SEND(dvSmtpSock_2,'viningele@msn.com','Netlinx Test SMTP', 'This is a test!',NULL_STR);
    SEND_STRING 0, "'dvSmtpSock_2, sending mail test, result-[ ',itoa(nResult),' ] <',ITOA(__LINE__),'>'"
    
    the error:
    Line     22 (19:15:06)::  MailSenderPrivate::Send authentication error 4 (Unknown error code)
    
    What's interesting is:
    Line      4 (19:15:02)::  dvSmtpSock_2, CURRENT_ADDRESS-[ smtp.comcast.net ] <5372>
    Line      5 (19:15:02)::  dvSmtpSock_2, CURRENT_PORT-[ 587 ] <5374>
    Line      6 (19:15:02)::  dvSmtpSock_2, CURRENT_FROM-[ ViningAudioVideo@comcast.net8$C0 ] <5376>
    Line      7 (19:15:02)::  dvSmtpSock_2, CURRENT_TLS-[ TRUE ] <5378>
    
    the ending 8$CO on the CURRENT_FROM, don't know what that's all about.

    Next attempt GET query returns:
    Line      6 (19:36:27)::  dvSmtpSock_2, CURRENT_FROM-[ ViningAudioVideo@comcast.net5, 2012 ] <5376>
    

    I would ask if anyone has this working yet before wasting any more time on it, you could be attempting something that's beyond your control to make work.

    I decided to run it again with:
    SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS,SMTP_TLS_FALSE);
    
    and got this:
    Line      4 (19:45:51)::  dvSmtpSock_2, CURRENT_ADDRESS-[ smtp.comcast.net ] <5372>
    Line      5 (19:45:51)::  dvSmtpSock_2, CURRENT_PORT-[ 587 ] <5374>
    Line      6 (19:45:51)::  dvSmtpSock_2, CURRENT_FROM-[ ViningAudioVideo@comcast.net5, 2012 ] <5376>
    Line      7 (19:45:51)::  dvSmtpSock_2, CURRENT_TLS-[ TRUE ] <5378>
    
    So the same funky crap at the end of CURRENT_FROM but now CURRENT_TLS still returns true. The next line printed was this:
    Line      8 (19:45:51)::  CIpLibrary::Mail_SmtpSend - sending TO: viningele@msn.com
    
    and then the master died. So from my short experience with these functions I'd say they're hosed!

    I posted some code in ModPedia some time ago that sets up a client/server between a client's master and the home office's master which is a much more reliable way to go. Might want to look into it. Now I need to pull this crap off my master and try to get it working again.

    I'm running the 4.1.373 master firmware & NS3.3.1.525 w/ Netlinx.axi 1.53
  • Options
    I didnt check the settings with the GET functions :/
    Will check it out later.

    but the error 4 i see here aswell when using smtp settings on port 587
  • Options
    ericmedleyericmedley Posts: 4,177
    This thread is just another reminder that the whole 'email from the client master' thing is just not that practicle. Each ISP has it hoops you have to jump and managing all that is tiresome once you multiply this over several systems.

    At my old job I wrote my own messaging system that used a NI at the shop which then emailed using our own mail server. It avoids all the hassle and is easily managed.
  • Options
    a_riot42a_riot42 Posts: 1,624
    I've been trying to get SMTP_SERVER_CONFIG_SET to work with no success. I keep getting "connection refused". Has anyone used the new SSL/TLS SMTP server in the new firmware with any success? There doesn't seem to be any way to debug what the issue is.
    Paul
  • Options
    I failed, and stoppet trying.
  • Options
    sonnysonny Posts: 208
    What a joke...

    I am just trying to do a simple test with a mock smtp server with the following..
    SMTP_SERVER_CONFIG_SET(SMTP_PORT_NUMBER, '1025')
    ....
    SMTP_SERVER_CONFIG_SET(SMTP_REQUIRE_TLS, SMTP_TLS_FALSE)
    .....
    // send
    
    ....
    portnum = SMTP_SERVER_CONFIG_GET(SMTP_PORT_NUMBER)
    tlsstate = SMTP_SERVER_CONFIG_GET(SMTP_REQUIRE_TLS)
    send_string 0, "'SMTP Port Number - ', portnum, '...TLS? ', tlsstate"
    
    
    

    I was getting connection refused (error 3), so did some packet captures and noticed my server was being asked to talk to port 42128. So I set the smtp server to listen on that port, then got Error 4, even though TLS is set to false...logged as follows
    Line     13 (09:25:56)::  SMTP Port Number - 42128...TLS? TRUE
    ...
    Line     15 (09:15:01)::  MailSenderPrivate::Send authentication error 4 (TLS not supported by server)
    
  • Options
    TurnipTruckTurnipTruck Posts: 1,485
    I agree with Eric. Email has been a holy grail that no one has been able to reach effectively and efficiently.

    I have my important systems connected M2M and use the tpcnotify command to get push notifications on my phone via TPControl. It works faster than email and can issue notifications of systems offline in situations where email would not work.

    Sent from my MB865 using Tapatalk 2
  • Options
    sonnysonny Posts: 208
    I've got a simple SMTP client in Java that will deliver basic stuff, but only works on open servers. I've prototyped using message queues to a cloud server for messaging. This is cool because it can easily be 2-way without VPN or open firewall configs, and can support any number of message types (tweets, facebook, texts, email, push). Hope to have one running in production in the near future.
  • Options
    Mail

    Before AMX even put the SMTP functions into the master, I wrote my own SMTP engine and I use POP mail based on an SMTP relay service that I pay a few quid for per year. Works for me.......it can also send attachments, which took quite a bit of working out.
    The SMTP relay service uses basic BASE 64 authentication which is more than adequate for what I use it for. I don't really like relying on stuff that I can't fix myself because it is hard coded into the Master.


    Duncan
Sign In or Register to comment.