Author |
Message
|
sankritya |
Posted: Fri Jan 30, 2009 2:26 am Post subject: Error Sending mail from EmailOutput Node using Gmail server |
|
|
Centurion
Joined: 14 Feb 2008 Posts: 100
|
Hi All,
I am trying to send a mail using the free Gmail SMTP server
smtp.gmail.com:465.
I have configured the broker using the follwing commands
mqsicreateconfigurableservice WBRK61_DEFAULT_BROKER -c SMTP -o SMTP_Alias
mqsichangeproperties WBRK61_DEFAULT_BROKER -c SMTP -o SMTP_Alias -n serverName -v smtp.gmail.com:465
mqsichangeproperties WBRK61_DEFAULT_BROKER -c SMTP -o SMTP_Alias -n securityIdentity -v MyIdentity
mqsisetdbparms WBRK61_DEFAULT_BROKER -n SMTP::MyIdentity -u abc@gmail.com -p 123456
After running the flow I am getting the followong error
( WBRK61_DEFAULT_BROKER.default ) The EmailOutput node received a Java exception when it tried to create an e-mail and send it to the SMTP server. The stack trace from the exception is 'com.ibm.broker.emailnodes.EmailOutputNode : javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
at javax.mail.Service.connect(Service.java:297)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:9
What else I need to do for sending the mail through gmail server? |
|
Back to top |
|
 |
zpat |
Posted: Fri Jan 30, 2009 3:19 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Why don't you use your local corporate SMTP server?
You should not build production applications using a third-party SMTP server that you may not even be able to connect to with firewall rules etc. |
|
Back to top |
|
 |
sankritya |
Posted: Fri Jan 30, 2009 5:28 am Post subject: |
|
|
Centurion
Joined: 14 Feb 2008 Posts: 100
|
I have tried it with the local SMTP server. It did not required any securityIdentity. So I want to check whether it will work with securityIdentity or not. And It is for testing purpose. |
|
Back to top |
|
 |
zpat |
Posted: Fri Feb 06, 2009 12:37 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
No corporation is going to allow SMTP connections from inside their firewall to outside, other than from their official SMTP server (unless they are very stupid). |
|
Back to top |
|
 |
hotdarshan |
Posted: Mon Feb 09, 2009 2:28 am Post subject: |
|
|
Novice
Joined: 17 Mar 2008 Posts: 16
|
First check weather the gmail is blocked or not from your workstation |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Feb 09, 2009 2:34 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
There are some Email Servers that :-
1) are simple to install & configure on Windows and/or Linux
AND
2) Free for non commercial/production use OR has a 30day trial license
As testing is not production use, I use one of these in a VM all the tome for this sort of testing.
If I were you, I'd look at getting hold of one of these and giving it a try for your testing needs. This way, you won't run the risk of breaching company security policies but trying to access gmail this way and you can be sure that your flows work properly before trying to hook them up to the corporate email system.
Google will help you find the tools I have in mind. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
leron8 |
Posted: Tue Nov 15, 2016 4:39 pm Post subject: |
|
|
 Novice
Joined: 25 Oct 2016 Posts: 20 Location: MX
|
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Nov 15, 2016 10:40 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
A lot has changed since 2009!
If you use the search button on this foum you will find a number of fairly recent posts that all have problems with Gmail. IT seems to be a PITA to setup and configure properly.
I'd look at them and if you still have problems, open a new post and refer to the posts you worked with and what is going wrong.
Remember to let us know what version of the product (in fixpack) and the platform you are working on. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 16, 2016 5:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Including all the various non-IIB settings that are listed there?
The error (with all respect to my worthy associate) still means what it did in 2009 - GMail is refusing the connection. So something in your set up, IIB or outside of that, is wrong.
For example, the IP address of your IIB may not be white listed. Or if you had it white listed, your corporate network may be performing a NAT. The possibilities are endless. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 16, 2016 5:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
And remember that all of google needs an SSL cert...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Wed Nov 16, 2016 5:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
leron8 wrote: |
What would be your suggestion with a corporation that works with Google Apps (Gmail for work) |
The obvious suggestion is to reach out to whoever maintains your corporate Gmail and ask them what they require for connection. IIB can't be the first piece of software in your organization that's trying to send an email.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
leron8 |
Posted: Wed Nov 16, 2016 1:43 pm Post subject: |
|
|
 Novice
Joined: 25 Oct 2016 Posts: 20 Location: MX
|
Thank you for your responses.
After some more investigation internally and on the web, and one of the answers above, I see that I need to indicate to the SMTP server that it needs to use TLS. Because I get this error
Quote: |
530 5.7.0 must issue a starttls command first gmail |
.
I don't see this option on for the smtp node, neither can I see for SSL. So it's not possible? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 16, 2016 3:59 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
what happens if you change the protocol to smtps:// ? And of course make a keystore and truststore available...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Nov 17, 2016 4:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
what happens if you change the protocol to smtps:// ? And of course make a keystore and truststore available...  |
If I remember, Gmail requires a different port. and a keystore/truststore.
Whether smtps is needed as well, I don't know. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
leron8 |
Posted: Thu Nov 17, 2016 9:37 am Post subject: |
|
|
 Novice
Joined: 25 Oct 2016 Posts: 20 Location: MX
|
When I do this:
mqsicreateconfigurableservice TESTNODE -c SMTP -o SMTP_AAA -n serverName,securityIdentity -v "smtps://smtp.gmail.com:465,identidadSMTP_AAA"
NOTE: I also tried with port 587
I get the following error:
java.lang.NumberFormatException: For input string: "//smtp.gmail.com"
I would think that it's expecting a port number after the first ":".
Question, what exactly do you mean by the keystores? Do I have to install a certificate at broker level?[/quote] |
|
Back to top |
|
 |
|