Hitachi Vantara Pentaho Community Forums
Results 1 to 29 of 29

Thread: Sending Mail via SMTP.GMAIL.COM

  1. #1
    Join Date
    Jan 2013
    Posts
    108

    Default Sending Mail via SMTP.GMAIL.COM

    hi all

    Trying to send email from myadress@gmail.com to myadress@mydomain.ch using Mail Entry in Job.

    I read almost all threads regarding my same problem with sending emails using smtp.gmail.com. i did what were suggested: Setting in email_config, also tried both SSL with 25/465 and TLS with 587. i did use my gmail account. no way, it still is not solved.

    If to use SSL with 25 or 465 it shows an error with Socket connection.
    If to use TLS with 587 it shows an error with AuthenticationFail.

    I activated IMAP in GMail account. what else can be done, what can be wrong, that it still doesn't work?? plsss help.

    ps: it works when i send email internally in my office at work. but when ii try it from home, it doesn't..


    Any help is appreciated, thank you in advance

  2. #2
    Join Date
    Jan 2013
    Posts
    108

    Default

    SSL with 25:

    Mail - ERROR (version 4.2.0-stable, build 15748 from 2011-09-08 13.11.42 by buildguy) : Problem while sending message: javax.mail.MessagingException: Exception reading response;
    nested exception is:
    javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

    When SSL with 465 is set:

    Mail - ERROR (version 4.2.0-stable, build 15748 from 2011-09-08 13.11.42 by buildguy) : Problem while sending message: javax.mail.MessagingException: Exception reading response;
    nested exception is:
    java.net.SocketException: Connection reset

  3. #3
    Join Date
    Jan 2013
    Posts
    108

    Default

    our organisation uses imap with 993 for a post-acces externally..and with ssl

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    I have no problems whatsoever to send mails out of my private network using my gmail account.
    Either your version of the Mail job entry is broken, or you did something wrong.

    Here are the necessary settings to check the latter:

    page group field value
    Addresses main Sender address mailbox@gmail.com
    Server SMTP server SMTP server smtp.gmail.com
    Port 465
    Authentication Use authentication true
    Authentication user mailbox
    Authentication password top-secret
    Use secure authentication true
    Secure connection type SSL

    If it's your Kettle version, try with a more recent one.
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Jan 2013
    Posts
    108

    Default

    hi marabu

    Tahnk you so much for your reply.

    I tried it on another Notebook, and it did work! I still do not know why it didnot on the first one.. I do not know if i face it again later with my clients.


    Thank you again.

  6. #6
    Join Date
    Jan 2013
    Posts
    108

    Default

    Hallo

    it now is not working, from another network..

    what else can be the reason? from one network works well, from another doesn't..

    plss help anybody..
    thanks you in advance

  7. #7
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Check with another mail client to make sure it's not the firewall.
    So long, and thanks for all the fish.

  8. #8
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    I would compare the 2 networks configurations.. which probably means talking to the network admins.

    My guess is that some IPs are blocked or some ports on firewall are closed.

    Mick

  9. #9
    Join Date
    Jan 2013
    Posts
    108

    Default

    hi all

    thank you for your replies.

    I discovered, that it sends only when connected to the network directly with a cable, but not with WLAN.

    But why? should it not work also for WIreliess connections?


    Thank you in advamce for your help

  10. #10
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    It depends on your network configuration.
    Your WLAN could be an entirely different network, after all.
    You can see for yourself using a shell window and executing ipconfig -all
    As Mick already suggested, it's best to ask the network admins about internal things.
    So long, and thanks for all the fish.

  11. #11
    Join Date
    Jan 2013
    Posts
    108

    Default

    Quote Originally Posted by marabu View Post
    Check with another mail client to make sure it's not the firewall.
    hi marabu

    i did try to send to an email-adress of yahoo with wlan - it didn't work.

    the thing is, i tried also from home with my own notebook with wlan - it worked well. tried with another notebook from home wlso with wlan - it didn't work.
    now i am doing it with my work-notebook at office with wlan - doesn't either.

    still loking for clarification for my client

    thank you anyway

  12. #12
    Join Date
    Jan 2013
    Posts
    108

    Default

    Quote Originally Posted by marabu View Post
    It depends on your network configuration.
    Your WLAN could be an entirely different network, after all.
    You can see for yourself using a shell window and executing ipconfig -all
    As Mick already suggested, it's best to ask the network admins about internal things.
    what should i ask at all, if they unblock the ips? i think they won't change any of security things only because of my MAIL Job Entry with smtp.gmail.com..

  13. #13
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by verynew View Post
    i did try to send to an email-adress of yahoo with wlan - it didn't work.
    It's useless to try with a different mail recipient, when your MTA (smtp.gmail.com) isn't reachable.
    Your tests with different notebooks don't mean much to me, because I can't remotely analyze the different network settings accounting for success or failure.

    Quote Originally Posted by verynew View Post
    what should i ask at all, if they unblock the ips?
    I don't think of you as a network expert, so you simply should ask for support.
    If it's a requirement of your project to send e-mail via a gmail server, network support should comply.
    Show them your client settings and they should be able to ask you the right questions in turn to find out what to do.
    They even should be able to advise you on how to get the required information.
    If you find no cooperation, let your project manager handle the situation.
    Communication with other organizational units is his job, after all.
    So long, and thanks for all the fish.

  14. #14
    Join Date
    Jan 2013
    Posts
    108

    Default

    hi all

    i forgot to mention, that my Pentaho-Job(with mail sending) will be used by several different organisations(i.e. A, B, C). And these Organisations are going to send Emails to an Email-adress of company X. Setting one smtp-server of gmail for all organisations will possibly be not so appropriate, because each organisation can have their own Firewall Settings and so forth.

    Or what you think? Is there any variants?


    Appreciate any of your suggessions and help, and thank you in advance
    Last edited by verynew; 06-26-2013 at 11:26 AM.

  15. #15
    Join Date
    Jan 2013
    Posts
    108

    Default

    And what if either the organisations no SMTP-Server have?

  16. #16
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Ideally, you check availability of a mail server, before you implement a solution requiring one.
    And normally you don't deploy a ready-to-use ETL solution.
    Part of the deployment package is an operations guide, that sheds some light on how to change the default configuration files to reflect a local environment.
    So long, and thanks for all the fish.

  17. #17
    Join Date
    Jan 2013
    Posts
    108

    Default

    Quote Originally Posted by verynew View Post
    hi all

    i forgot to mention, that my Pentaho-Job(with mail sending) will be used by several different organisations(i.e. A, B, C). And these Organisations are going to send Emails to an Email-adress of company X. Setting one smtp-server of gmail for all organisations will possibly be not so appropriate, because each organisation can have their own Firewall Settings and so forth.
    I talked to our admins. And this above mentioned company X is us.. And admins say we do have no smtp.server, but only exchange-server.

    Is it then possible, if the organisations send us emails not through smtp, but through our exchange-server? if to write a javascript-ppiece? we do have smtp-server only internally..
    Last edited by verynew; 06-27-2013 at 05:12 AM.

  18. #18
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You're not the only one with an Exchange mail infrastructure, no big deal
    Operations does not allow SMTP mail clients, only Outlook for inhouse use.
    We have a SMTP gateway to keep Java based services happy.

    You expect a couple of organisations to send mails via Kettle, I understand.
    These are in fact organizational units sharing your Exchange servers?

    Kettle has out of the box support for SMTP only.
    In fact Exchange supports standard internet protocols, but they may be disabled for client connections.
    No problem for incoming mail, though.

    Ask someone which API you can use as a developer.
    With Exchange, most likely it will be MAPI.

    Try to implement the actual mail sending outside of Kettle as a Windows program that you can control via command line.
    That way you can easily use it from Kettle.
    So long, and thanks for all the fish.

  19. #19
    Join Date
    Jan 2013
    Posts
    108

    Default

    Can you clarify it more precisely pllsss..

  20. #20
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Which part you don't understand?
    So long, and thanks for all the fish.

  21. #21
    Join Date
    Jan 2013
    Posts
    108

    Default

    Quote Originally Posted by marabu View Post
    Try to implement the actual mail sending outside of Kettle as a Windows program that you can control via command line.
    That way you can easily use it from Kettle.
    THis part..

  22. #22
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Well, I figured you will have a hard time to implement a MAPI client in Java or JavaScript.
    Might be easier to write a Windows program along the lines of a sample.
    Kettle allows you to call commandline tools - e.g. Execute a process.

    PS: I keep reading the Exchange Resource Kit comes with a non-GUI client named MAPISend - check it out.

    PPS: Maybe you are a PowerShell guy?

    PPPS: Or you are fond of Automation?
    Last edited by marabu; 06-27-2013 at 11:12 AM.
    So long, and thanks for all the fish.

  23. #23
    Join Date
    Jan 2013
    Posts
    108

    Default

    i think this new method will again be depending on the settings of organisations., won't it? there is call of mail client or i dunno what else.

    i'm no powershell guy either fond of automation. i really am very new to pentaho and databank. Java stuff is my old friend, that i didn't met for about 5 years. my latest product is a really complicated little crazy girl at home..
    Last edited by verynew; 06-27-2013 at 11:56 AM.

  24. #24
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by verynew View Post
    my latest product is a really complicated little crazy girl at home..
    Best product I can imagine, congratulations
    So long, and thanks for all the fish.

  25. #25
    Join Date
    Jan 2013
    Posts
    108

    Default

    Quote Originally Posted by marabu View Post
    Well, I figured you will have a hard time to implement a MAPI client in Java or JavaScript.
    Might be easier to write a Windows program along the lines of a sample.
    Kettle allows you to call commandline tools - e.g. Execute a process.

    PS: I keep reading the Exchange Resource Kit comes with a non-GUI client named MAPISend - check it out.

    PPS: Maybe you are a PowerShell guy?

    PPPS: Or you are fond of Automation?
    So far i see that even if i start sending mail via powershell(as a batch-file using cmd.exe - MAPISEND) it needs calling this smtp-server again, and not any other like exchange-server or?

    ps: thank you for congratulations on my reproduction
    Last edited by verynew; 06-28-2013 at 04:30 AM.

  26. #26
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    All the suggestions in my previous post deal with MAPI, not with SMTP.

    With PowerShell you must implement a script like the one I linked to.
    MAPISend.exe only needs cmd.exe as a launcher and is completely controlled by commandline parameters.
    MAPISend.exe should be easier for you, but you first must make sure it is available.
    So long, and thanks for all the fish.

  27. #27
    Join Date
    Jan 2013
    Posts
    108

    Default

    how then to make it sure if it is available? should it also be available in organisation, which are going to send mails using my Pentaho-Job to us?

  28. #28
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Just declare it a prerequisite when no SMTP server is present.
    And don't forget to provide a chapter on this in the Administration Guide of your ETL solution.
    So long, and thanks for all the fish.

  29. #29

    Default

    you have to activate this !!!=>>>> https://www.google.com/settings/security/lesssecureapps ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.