Score:0

How to submission server of an email (SMTP)?

cn flag

I will brief you about the situation I'm in, what issue I am facing and what I have tried.

I have set up a web app using flask, where users can send automated emails (not email campaigns) to a list of emails that they upload in excel. So if you register on the website as [email protected] and upload a list of emails in excel, the app will automatically send emails to the ids listed through smtp.gmail.com.

But as more users enroll for the web app from different domains, it is not possible for me to manually type in the SMTP server and port of the client. For instance, recently a client registered with email [email protected] so I checked the MX records and found it was from domain 163mx03.mxmail.netease.com and then I had to google for netease.com SMTP which after few websites I found to be smtp.ym.163.com at port 25.

I have already added all the major SMTP servers in the backend (like Gmail, outlook, Zoho) but still, there are new users from the different SMTP server.

  1. How can I address this issue? How to get dynamically the SMTP of the domain so that I can apply it to the user for sending email?
  2. Is there a way that I can get the SMTP server of the user (by asking them to send me an email)?
  3. Is there a way to tackle this issue by creating a new SMTP?
  4. Is there any way that I can send an email without providing the SMTP but just the email and password of the user?
Score:1
in flag

There's no easy solution for your problem, but you can have a look at the way Mozilla Thunderbird attempts autoconfiguration of a user's email account. Details are here:

https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration

Most promising is the ISP database they maintain. This database can be queried through a special URL https://autoconfig.thunderbird.net/v1.1/{domainname} For instance, to lookup gmail.com:

https://autoconfig.thunderbird.net/v1.1/gmail.com

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.