Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate email address is deliverable before creating account #1247

Open
sentry-io bot opened this issue Jun 1, 2021 · 2 comments
Open

Validate email address is deliverable before creating account #1247

sentry-io bot opened this issue Jun 1, 2021 · 2 comments
Assignees
Labels

Comments

@sentry-io
Copy link

sentry-io bot commented Jun 1, 2021

From time to time, users will typo an email address (e.g. gmail.comm), but we'll create an account and attempt to verify the email address anyway. Our mail service, Mailgun, will reject the address immediately and then AnyMail, the mail library raises an exception.

We should validate that the email address is deliverable before creating the account and return an error to the user if it isn't.

I know Mailgun has a REST API for validating email servers. Does AnyMail have an API that can use it? I don't want to add a Mailgun dependence if possible.

Sentry Issue: BOOTCAMPS-17Q

AnymailRequestsAPIError: Sending a message to [email protected] from MIT Bootcamps <[email protected]
Mailgun API response 400 (BAD REQUEST):
{
  "message": "'to' parameter is not a valid address. please check documentation"
}
(3 additional frame(s) were not displayed)
...
  File "anymail/backends/base.py", line 95, in send_messages
    sent = self._send(message)
  File "anymail/backends/base_requests.py", line 60, in _send
    return super(AnymailRequestsBackend, self)._send(message)
  File "anymail/backends/base.py", line 125, in _send
    response = self.post_to_esp(payload, message)
  File "anymail/backends/base_requests.py", line 82, in post_to_esp
    self.raise_for_status(response, payload, message)
  File "anymail/backends/base_requests.py", line 93, in raise_for_status
    raise AnymailRequestsAPIError(email_message=message, payload=payload, response=response,

Error sending email 'Verify your email' to ["[email protected]"]
@HamzaIbnFarooq HamzaIbnFarooq self-assigned this Jul 14, 2021
@HamzaIbnFarooq
Copy link
Contributor

AnyMail works just like a proxy in sending emails (to Mailgun in our case). It doesn't have any email validation mechanism and totally depends upon the Mailing service it's using underneath.

If we want to proceed with email validation then we have to add the Mailgun API dependency (https://www.mailgun.com/email-validation/email-validator/).

Do we have any Mailgun account with this API enabled?

@pdpinch
Copy link
Member

pdpinch commented Jul 21, 2021

We need to consider the cost implications for this API from Mailgun.

@pdpinch pdpinch self-assigned this Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants