Announcement

Collapse
No announcement yet.

Gmail SMTP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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: [email protected]
    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

  • #2
    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, 05:35 AM.

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment


        • #5
          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!

          Comment


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



            Thank you all
            Best Regards,
            Alex Neiva

            Comment


            • #7
              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!
              Last edited by siddharth; 06-19-2018, 10:22 PM. Reason: foo
              HL7v2.7 Certified Control Specialist!

              Comment


              • #8
                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.

                Comment

                Working...
                X