Can you write a complete example #103

Closed
opened 2022-12-05 08:05:53 +01:00 by JackyNiu · 4 comments
from validate_email import validate_email
is_valid = validate_email(
    email_address='example@example.com',
    check_format=True,
    check_blacklist=True,
    check_dns=True,
    dns_timeout=10,
    check_smtp=True,
    smtp_timeout=10,
    smtp_helo_host='my.host.name',
    smtp_from_address='my@from.addr.ess',
    smtp_skip_tls=False,
    smtp_tls_context=None,
    smtp_debug=False,
    address_types=frozenset([IPv4Address, IPv6Address]))

your example don`t work

``` from validate_email import validate_email is_valid = validate_email( email_address='example@example.com', check_format=True, check_blacklist=True, check_dns=True, dns_timeout=10, check_smtp=True, smtp_timeout=10, smtp_helo_host='my.host.name', smtp_from_address='my@from.addr.ess', smtp_skip_tls=False, smtp_tls_context=None, smtp_debug=False, address_types=frozenset([IPv4Address, IPv6Address])) ``` your example don`t work
Owner

This is a complete example, demonstrating the usage of the parameters.

You have to customize it to your local/server environment.

This is a complete example, demonstrating the usage of the parameters. You have to customize it to your local/server environment.
Author

This is a complete example, demonstrating the usage of the parameters.

You have to customize it to your local/server environment.

This is my code. The prompt "None" is returned. In fact, this email is valid
The verification prompt of https://www.verifyemailaddress.org/email-validation is also valid

from validate_email import validate_email

email = 'niujc@userscrm.com'

is_valid = validate_email(
    email_address=email,
    check_format=True,
    check_blacklist=False,
    check_dns=True,
    dns_timeout=3,
    check_smtp=True,
    smtp_timeout=3,
    smtp_helo_host='smtp.mxhichina.com',
    smtp_from_address='niujc@userscrm.com',
    smtp_skip_tls=False,
    smtp_tls_context=None,
    smtp_debug=True,
    # address_types=frozenset([IPv4Address, IPv6Address])
    )
    
print(is_valid)

image

> This is a complete example, demonstrating the usage of the parameters. > > You have to customize it to your local/server environment. This is my code. The prompt "None" is returned. In fact, this email is valid The verification prompt of https://www.verifyemailaddress.org/email-validation is also valid ``` from validate_email import validate_email email = 'niujc@userscrm.com' is_valid = validate_email( email_address=email, check_format=True, check_blacklist=False, check_dns=True, dns_timeout=3, check_smtp=True, smtp_timeout=3, smtp_helo_host='smtp.mxhichina.com', smtp_from_address='niujc@userscrm.com', smtp_skip_tls=False, smtp_tls_context=None, smtp_debug=True, # address_types=frozenset([IPv4Address, IPv6Address]) ) print(is_valid) ``` ![image](/attachments/d38ba55b-1441-4c6f-9d12-27076048c8a7)
118 KiB
Author

This is a complete example, demonstrating the usage of the parameters.

You have to customize it to your local/server environment.

I change SMTP_PORT to 465 of smtplib.py
Is also return None

> This is a complete example, demonstrating the usage of the parameters. > > You have to customize it to your local/server environment. I change SMTP_PORT to 465 of smtplib.py Is also return None
Owner

When you opened this issue, there was a text saying you should read the FAQ, just like there is on the index page of this module.

Yet you decided to just ignore and delete it.

Do that and act accordingly.

When you opened this issue, there was a text saying you should read the FAQ, just like there is on the index page of this module. Yet you decided to just ignore and delete it. Do that and act accordingly.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: karolyi/py3-validate-email#103
No description provided.