web stats
Error while sending email - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2010, 01:39 AM
satyam satyam is offline
Mirth Newb
 
Join Date: Oct 2010
Location: Hyderabad,India
Posts: 24
satyam is on a distinguished road
Question Error while sending email

Hi,

I have a mirth instance configured to send emails for a particular channel.
Email sender is the destination for this channel.

I am using smtp.gmail.com as my smtp server.
port is 587. It is using tls.

I am able to telnet to smtp.gmail.com on port 587 from the machine. Therefore connectivity is not an issue. I am getting the following error in the mith log which I dont know what to do. Any help would be appreciated.

FAILURE: Error sending email
MessagingException
Could not convert socket to TLS



Detailed exception:-


ERROR-402: SMTP connector error
ERROR MESSAGE: Error sending email
javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl )
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTrans port.java:1230)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SM TPTransport.java:378)
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:98)
at com.webreach.mirth.connectors.email.SmtpMessageDis patcher.sendMailMessage(SmtpMessageDispatcher.java :199)
at com.webreach.mirth.connectors.email.SmtpMessageDis patcher.doDispatch(SmtpMessageDispatcher.java:156)
at com.webreach.mirth.connectors.email.SmtpMessageDis patcher.doSend(SmtpMessageDispatcher.java:187)
at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:167)
at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:45)
at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:180)
at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:147)
at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:235)
at com.webreach.mirth.connectors.jdbc.JdbcMessageRece iver.processMessage(JdbcMessageReceiver.java:168)
at org.mule.providers.TransactedPollingMessageReceive r$1.doInTransaction(TransactedPollingMessageReceiv er.java:98)
at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:72)
at org.mule.providers.TransactedPollingMessageReceive r.poll(TransactedPollingMessageReceiver.java:104)
at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:90)
at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl )
at javax.net.ssl.DefaultSSLSocketFactory.throwExcepti on(SSLSocketFactory.java:179)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket (SSLSocketFactory.java:199)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFet cher.java:249)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTrans port.java:1226)
... 35 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl )
at java.security.Provider$Service.newInstance(Provide r.java:1245)
at sun.security.jca.GetInstance.getInstance(GetInstan ce.java:220)
at sun.security.jca.GetInstance.getInstance(GetInstan ce.java:147)
at javax.net.ssl.SSLContext.getInstance(SSLContext.ja va:125)
at javax.net.ssl.SSLContext.getDefault(SSLContext.jav a:68)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocke tFactory.java:102)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFet cher.java:247)
... 36 more
Caused by: java.security.PrivilegedActionException: java.io.FileNotFoundException: /opt/Mirth/conf (Is a directory)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl .getDefaultKeyManager(DefaultSSLContextImpl.java:1 20)
at com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl .<init>(DefaultSSLContextImpl.java:40)
at sun.reflect.GeneratedConstructorAccessor96.newInst ance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:27)




Regards,
Satyam
at java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at java.security.Provider$Service.newInstance(Provide r.java:1221)
... 42 more
Caused by: java.io.FileNotFoundException: /opt/Mirth/conf (Is a directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.jav a:106)
at java.io.FileInputStream.<init>(FileInputStream.jav a:66)
at com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl $2.run(DefaultSSLContextImpl.java:123)
at com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl $2.run(DefaultSSLContextImpl.java:121)
... 51 more
Reply With Quote
  #2  
Old 10-27-2010, 06:32 AM
metropath metropath is offline
OBX.3 Kenobi
 
Join Date: Jan 2010
Posts: 139
metropath is on a distinguished road
Default Gmail can be really tricky

I would suggest you research on the gmail side and not the Mirth side. Mirth works great and my history with gmail is that it can be really finicky in attaching to it from any type of client. Review their recommendations and make sure every i is dotted and every t is crossed. Then see if you're still getting errors. Gmail works great but you are bumping up against one of the trickier parts of using it.

Also, the Mirth Appliance doesn't have to use Gmail. It can send mail on it's own. (Not sure if you have the appliance or not)
__________________
Jimmy
- Denver, Colorado
Reply With Quote
  #3  
Old 10-27-2010, 06:35 AM
metropath metropath is offline
OBX.3 Kenobi
 
Join Date: Jan 2010
Posts: 139
metropath is on a distinguished road
Default Configure Gmail to use client

You also need to configure gmail to allow pop access for that account if you haven't done it yet.

Here are their recommended settings:

Incoming Mail (POP3) Server - requires SSL: pop.gmail.com
Use SSL: Yes
Port: 995
Outgoing Mail (SMTP) Server - requires TLS or SSL: smtp.gmail.com (use authentication)
Use Authentication: Yes
Port for TLS/STARTTLS: 587
Port for SSL: 465
Account Name: your full email address (including @gmail.com or @your_domain.com)
Email Address: your email address (username@gmail.com or username@your_domain.com)
Password: your Gmail password
__________________
Jimmy
- Denver, Colorado
Reply With Quote
  #4  
Old 10-28-2010, 12:45 AM
satyam satyam is offline
Mirth Newb
 
Join Date: Oct 2010
Location: Hyderabad,India
Posts: 24
satyam is on a distinguished road
Default

@metropath
Hi,

I have checked the settings. I think the exception is not about these google settings. It is something else.
Reply With Quote
  #5  
Old 10-28-2010, 06:20 AM
metropath metropath is offline
OBX.3 Kenobi
 
Join Date: Jan 2010
Posts: 139
metropath is on a distinguished road
Default Mirth TLS implementation problem with Gmail.

Quote:
Originally Posted by satyam View Post
@metropath
Hi,

I have checked the settings. I think the exception is not about these google settings. It is something else.
It's starting to look like a Mirth implementation problem. Hopefully someone from Mirth can offer some support. Do you have an appliance? Mirth has its own built in email service, too. Just not sure it's on the distribution or only available on appliances.

I think if you were using a less secure mail server, you probably wouldn't be having these issues, but it appears the implementation of TLS in Mirth is not working with Gmail. Have you tried using the different ports available with Gmail? They have multiple ports that you can try. I have found that just changing to one of their alternative ports has resolved problems when I'm connecting a client to them.

I think you need to focus on these errors: (Sorry I don't have more input for you)

Detailed exception:-


ERROR-402: SMTP connector error
ERROR MESSAGE: Error sending email
javax.mail.MessagingException: Could not convert socket to TLS;
nested exception is:
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl )
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl )
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl )
Caused by: java.security.PrivilegedActionException: java.io.FileNotFoundException: /opt/Mirth/conf (Is a directory)
Caused by: java.io.FileNotFoundException: /opt/Mirth/conf (Is a directory)
__________________
Jimmy
- Denver, Colorado
Reply With Quote
  #6  
Old 10-28-2010, 06:34 AM
panickc panickc is offline
OBX.3 Kenobi
 
Join Date: Dec 2007
Posts: 127
panickc is an unknown quantity at this point
Default

I had a similar problem running Mirth on Windows to a Linux SMTP server that allowed my workstation to relay emails for internal notifications. Wouldn't work, don't remember if it was the same error or not.

So, what I did was set up the Windows SMTP service, point Mirth to it on my local workstation and point the Windows SMTP to the Linux email server. That worked, but would've been nicer to go the direct route.

-cp
Reply With Quote
Reply

Tags
support

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation