librelist archives

« back to archive

smtp provider question

smtp provider question

From:
Robert La Ferla
Date:
2014-06-14 @ 01:46
The providers list contains multiple SMTP configurations for a given 
provider.  What is the recommended approach to using this?  Does an 
application try ALL three configurations until one succeeds?  For gmail, I
tried using port 587/starttls which failed but using 465/ssl succeeded.  
How does my app know which one will work?  Again, should it somehow test 
each until it finds one that works?  I noticed that when I look at Apple’s
Mail.app (OSX) settings for GMAIL, it lists all three ports.  Therefore, I
suspect they try to use all three.

Thoughts?  Code?

THANKS!


    "gmail":{
        "servers":{
            "imap":[
                {
                    "port":993,
                    "hostname":"imap.gmail.com",
                    "ssl":true
                }
            ],
            "smtp":[
                {
                    "port":587,
                    "hostname":"smtp.gmail.com",
                    "starttls":true
                },
                {
                    "port":465,
                    "hostname":"smtp.gmail.com",
                    "ssl":true
                },
                {
                    "port":25,
                    "hostname":"smtp.gmail.com",
                    "starttls":true
                }
            ]
        },
        "mx-match":[
            "aspmx2\\.googlemail\\.com",
            "aspmx\\.l\\.google\\.com",
            "aspmx3\\.googlemail\\.com",
            "alt1\\.aspmx\\.l\\.google\\.com",
            "alt2\\.aspmx\\.l\\.google\\.com",
            "alt1\\.gmail-smtp-in\\.l\\.google\\.com",
            "alt2\\.gmail-smtp-in\\.l\\.google\\.com",
            "alt3\\.gmail-smtp-in\\.l\\.google\\.com",
            "alt4\\.gmail-smtp-in\\.l\\.google\\.com",
            "gmail-smtp-in\\.l\\.google\\.com"
        ],
        "domain-match":[
            "googlemail\\.com",
            "gmail\\.com"
        ],
        "mailboxes":{
            "sentmail":"[Gmail]/Sent",
            "allmail":"[Gmail]/All Mail",
            "starred":"[Gmail]/Starred",
            "trash":"[Gmail]/Trash",
            "drafts":"[Gmail]/Drafts",
            "spam":"[Gmail]/Spam",
            "important":"[Gmail]/Important"
        }
    },

Re: [mailcore] smtp provider question

From:
Hoa V. Dinh
Date:
2014-06-14 @ 06:44
Sure. You have to try all three. If one is working, you can probably keep 
it as the one that most likely to work.  

--  
Hoa V. DINH


On Friday, June 13, 2014 at 6:46 PM, Robert La Ferla wrote:

> The providers list contains multiple SMTP configurations for a given 
provider.  What is the recommended approach to using this?  Does an 
application try ALL three configurations until one succeeds?  For gmail, I
tried using port 587/starttls which failed but using 465/ssl succeeded.  
How does my app know which one will work?  Again, should it somehow test 
each until it finds one that works?  I noticed that when I look at Apple’s
Mail.app (OSX) settings for GMAIL, it lists all three ports.  Therefore, I
suspect they try to use all three.
>  
> Thoughts?  Code?
>  
> THANKS!
>  
>  
>     "gmail":{
>         "servers":{
>             "imap":[
>                 {
>                   &n bsp; "port":993,
>                     "hostname":"imap.gmail.com (http://imap.gmail.com)",
>                     "ssl":true
>                 }
>             ],
>             "smtp":[
>                 {
>                     "port":587,
>                     "hostname":"smtp.gmail.com (http://smtp.gmail.com)",
>                     "starttls":true
>                 },
>                 {
>                     "port":465,
>                     "hostname":"smtp.gmail.com (http://smtp.gmail.com)",
>                     "ssl":true
>                 },
>                 {
>                     "port":25,
>                     "hostname":"smtp.gmail.com (http://smtp.gmail.com)",
>                     "starttls":true
>                 }
>             ]
>         },
>         "mx-match":[
>             "aspmx2\\.googlemail\\.com",
>             "aspmx\\.l\\.google\\.com",
>             "aspmx3\\.googlemail\\.com",
>             "alt1\\.aspmx\\.l\\.google\\.com",
>             "alt2\\.aspmx\\.l\\.google\\.com",
>             "alt1\\.gmail-smtp-in\\.l\\.google\\.com",
>             "alt2\\.gmail-smtp-in\\.l\\.google\\.com",
>             "alt3\\.gmail-smtp-in\\.l\\.google\\.com",
>             "alt4\\.gmail-smtp-in\\.l\\.google\\.com",
>             "gmail-smtp-in\\.l\\.google\\.com"
>         ],
>         "domain-match":[
>             "googlemail\\.com",
>             "gmail\\.com"
>         ],
>         "mailboxes":{
>             "sentmail":"[Gmail]/Sent",
>             "allmail":"[Gmail]/All Mail",
>             "starred":"[Gmail]/Starred",
>             "trash":"[Gmail]/Trash",
>             "drafts":"[Gmail]/Drafts",
>             "spam":"[Gmail]/Spam",
>             "important":"[Gmail]/Important"
>         }
>     },
>