web stats
Gmail SMTP - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2018, 02:04 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Angry Gmail SMTP

Hello,


I'm trying to use gmail SMTP in Mirth 3.5.1 with no success!


Host: smtp.gmail.com
Port: 465 (SSL) / 587 (TLS)
Authentication: Yes
Mail: xxx@gmail.com
Pwd: xxxx


And does not work! I remove the double authentication factor on my gmail account and still nothing!

Any ideas?

Thank you
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #2  
Old 06-19-2018, 06:19 AM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 166
obsessio is on a distinguished road
Default

Same settings with yours,
try to debug JavaMail.




PHP Code:
DEBUGJavaMail version 1.5.0
DEBUG
successfully loaded resource: /META-INF/javamail.default.providers
DEBUG
Tables of loaded providers
DEBUG
Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle]}
DEBUGProviders Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]}
DEBUGsuccessfully loaded resource: /META-INF/javamail.default.address.map
DEBUG
getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTPuseEhlo trueuseAuth true
DEBUG SMTP
useEhlo trueuseAuth true
DEBUG SMTP
trying to connect to host "smtp.gmail.com"port 587isSSL false
220 smtp
.gmail.com ESMTP h77-v6sm124092wmd.9 gsmtp
DEBUG SMTP
connected to host "smtp.gmail.com"port587

EHLO 
**********.local
250
-smtp.gmail.com at your service, [***.***.30.2]
250-SIZE 35882577
250
-8BITMIME
250
-STARTTLS
250
-ENHANCEDSTATUSCODES
250
-PIPELINING
250
-CHUNKING
250 SMTPUTF8
DEBUG SMTP
Found extension "SIZE"arg "35882577"
DEBUG SMTPFound extension "8BITMIME"arg ""
DEBUG SMTPFound extension "STARTTLS"arg ""
DEBUG SMTPFound extension "ENHANCEDSTATUSCODES"arg ""
DEBUG SMTPFound extension "PIPELINING"arg ""
DEBUG SMTPFound extension "CHUNKING"arg ""
DEBUG SMTPFound extension "SMTPUTF8"arg ""
STARTTLS
220 2.0.0 Ready to start TLS
EHLO 
**********..local
250
-smtp.gmail.com at your service, [***.***.30.2]
250-SIZE 35882577
250
-8BITMIME
250
-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
250
-ENHANCEDSTATUSCODES
250
-PIPELINING
250
-CHUNKING
250 SMTPUTF8
DEBUG SMTP
Found extension "SIZE"arg "35882577"
DEBUG SMTPFound extension "8BITMIME"arg ""
DEBUG SMTPFound extension "AUTH"arg "LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH"
DEBUG SMTPFound extension "ENHANCEDSTATUSCODES"arg ""
DEBUG SMTPFound extension "PIPELINING"arg ""
DEBUG SMTPFound extension "CHUNKING"arg ""
DEBUG SMTPFound extension "SMTPUTF8"arg ""
DEBUG SMTPAttempt to authenticate using mechanismsLOGIN PLAIN DIGEST-MD5 NTLM
DEBUG SMTP
AUTH LOGIN command trace suppressed
DEBUG SMTP
AUTH LOGIN succeeded
DEBUG SMTP
use8bit false
MAIL FROM
:<*********@gmail.com>
250 2.1.0 OK h77-v6sm124092wmd.9 gsmtp
RCPT TO
:<*********@gmail.com>
250 2.1.5 OK h77-v6sm124092wmd.9 gsmtp
DEBUG SMTP
Verified Addresses
DEBUG SMTP
:   *********@gmail.com
DATA
354  Go ahead h77
-v6sm124092wmd.9 gsmtp
Date
Tue19 Jun 2018 16:18:29 +0300 (EET)
From: *********@gmail.com
To
: *********@gmail.com
Message
-ID: <723400254.2.1529414309622.JavaMail.*********@*********>
SubjectMirth Connect Test Email
MIME
-Version1.0
Content
-Typetext/plaincharset=us-ascii
Content
-Transfer-Encoding7bit

Receipt of this email confirms that mail originating from this Mirth Connect Server is capable of reaching its intended destination
.

SMTP Configuration:
Hostsmtp.gmail.com
Port587
.
250 2.0.0 OK 1529414311 h77-v6sm124092wmd.9 gsmtp
QUIT
221 2.0.0 closing connection h77
-v6sm124092wmd.9 gsmtp 

Last edited by obsessio; 06-19-2018 at 06:35 AM.
Reply With Quote
  #3  
Old 06-19-2018, 07:18 AM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,005
agermano is on a distinguished road
Default

When using two-factor auth with google, you need to set up an application specific password for mirth to use that is different from your normal password.
Reply With Quote
  #4  
Old 06-19-2018, 08:13 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Default

Yes but i remove the two factor authentication!
Should be the normal password, but still not success using SSL or TLS!
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #5  
Old 06-19-2018, 08:57 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 835
siddharth is on a distinguished road
Default

There is a security feature in google which says Allow less secured apps. Try turning that ON and then check. it would be present on myaccount.google.com
__________________
HL7v2.7 Certified Control Specialist!
Reply With Quote
  #6  
Old 06-19-2018, 09:11 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 277
AlexNeiva is on a distinguished road
Default

Yes it was that @siddharth
I thought I had that checked but i guess it wasn't!!!



Thank you all
__________________
Best Regards,
Alex Neiva
Reply With Quote
  #7  
Old 06-19-2018, 11:21 PM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 835
siddharth is on a distinguished road
Default

I think it is probably worth discussing that why google considers Mirth as a less secured App. Take Quora for instance, when we select login using Google, it redirects to google account and then google authenticates you as a valid user using SSO and exchange information. This is something Mirth is not doing and Mirth straight away asks for smtp settings, and is probably the reason why It is classified as a less secured App.

I think that option is there in google for backward compatibility, and would go away in future. The more I think about it, my head hurts!
__________________
HL7v2.7 Certified Control Specialist!

Last edited by siddharth; 06-19-2018 at 11:22 PM. Reason: foo
Reply With Quote
  #8  
Old 07-05-2018, 07:51 AM
rdejournett rdejournett is offline
OBX.2 Kenobi
 
Join Date: Jan 2013
Posts: 99
rdejournett is on a distinguished road
Default

I didn't have luck when i tried it a while ago. There is a host of features in google API that can now be leveraged.

But I used send pulse for free email sending - that works.

The other thing is you can use is zapier as a pass thru. Use the SMTP mail option and send to gmail.
Reply With Quote
Reply

Tags
email, gmail, smtp, smtpconnection

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 06:04 AM.


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