Questions tagged [email-validation]

Email validation is the process of deciding whether a given string is a valid email-address or not. This is distinct from email verification, which is necessary to determine if a given email address really exists, and (usually) whether a particular person has access to it (e.g. during an account signup process).

1243 questions
17
votes
5 answers

Using MX records to validate email addresses

Scenario: I have a contact form on my web app, it gets alot of spam. I am validating the format of email addresses loosely i.e. ^.+@.+\..+$ I am using a spam filtering service (defensio) but the spam scores returned are overlapping with valid…
Question Mark
  • 3,557
  • 1
  • 25
  • 30
15
votes
2 answers

Leading underscores in an email address?

What RFC would I refer to in order to find out if a leading underscore in the local part of an email address is acceptable? Example: _johndoe@hotmail.com Of course, this question can also apply to any leading special character. I found this line in…
Ray
  • 3,409
  • 8
  • 33
  • 40
15
votes
2 answers

Valid Email Addresses - XSS and SQL Injection

Since there are so many valid characters for email addresses, are there any valid email addresses that can in themselves be XSS attacks or SQL injections? I couldn't find any information on this on the web. The local-part of the e-mail address …
Lotus Notes
  • 6,302
  • 7
  • 32
  • 47
14
votes
3 answers

How to Verify an Email Address in Python Using smtplib

I have been trying to verify an email address entered by the user in my program. The code I currently have is: server = smtplib.SMTP() server.connect() server.set_debuglevel(True) try: server.verify(email) except Exception: return…
Ertdes
  • 159
  • 1
  • 1
  • 5
13
votes
2 answers

SwiftUI email validation

How is email validation done with swiftUI? TextField("Please enter your e-mail", text: self.$email) .modifier(ClearButton(text: $email)) .font(.headline) .padding(10) .foregroundColor(.black) .background(Color.white) …
user12723399
  • 127
  • 1
  • 1
  • 5
13
votes
5 answers

python: correct method verify if email exists

I am trying to verify if an email actually exists by first resolving its dns, then check if the email is valid using the below code: email = test@cisco.com domain = email.split("@")[-1] records = dns.resolver.query(domain, 'MX') …
Sam Rohn
  • 359
  • 2
  • 5
  • 13
12
votes
6 answers

Validating the email address in UITextField

I am trying to put validation in text field containing email address.What is to be added in string "emailRegEx" to limit the user from inserting three dots in email address or what I have to write in method for same. - (BOOL)textField:(UITextField…
Ketan Shinde
  • 1,847
  • 4
  • 18
  • 38
12
votes
2 answers

Library for canonicalizing (normalizing but NOT just cleansing) email addresses

There are multiple ways to produce email address Strings that differ with straight String comparison (see below), but are logically equivalent (i.e. mail sent to both goes to same mail box). This often allows users to give seemingly unique email…
StaxMan
  • 113,358
  • 34
  • 211
  • 239
12
votes
5 answers

EmailAddressAttribute incorrectly categorizing French e-mail address as invalid

I'm using the EmailAddressAttribute for use on my model. The problem is when I use a (perfectly valid) e-mail address of óscar@yahoo.com it says it is invalid. Model: public class ForgotPasswordViewModel { [Required] [EmailAddress] …
m.edmondson
  • 30,382
  • 27
  • 123
  • 206
12
votes
5 answers

How to validate email in Jquery?

I have written the following contact form validation script. How can I validate a email field?