badoux / checkmail

Golang package for email validation
MIT License
718 stars 91 forks source link

always got error althougt email is real #4

Closed goldalworming closed 5 years ago

goldalworming commented 7 years ago

Hi, I always got Error 421 Cannot connect to SMTP server 74.125.68.26 (74.125.68.26:25), connect error 10060 althought it's valid email

Do you have any ideas to fix it

goldalworming commented 7 years ago

Code: 421, Msg: 421 Cannot connect to SMTP server 74.125.68.27 (74.125.68.27:25), connect error 10060

badoux commented 7 years ago

Hi,

Can you give me the email so i can test with it ?

Thks

badoux commented 7 years ago

BTW if this is a SMTP error i can't do nothing. You have to treat this email as valid and send a mail to the user to validate the mail. This library can't validate an email at 100%, it should be used in addition to the send of an activitation email for exemple.

func main() {
    err := checkmail.ValidateHost("validuser@gmail.com")
    if err == nil {
        // user ok , no need to send an activation email 
     }
     if err != nil {
       // validation email
     }
}
goldalworming commented 7 years ago

should use certain smtp setting to make this library works?