### Install MailScout using pip Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Install the MailScout library using pip. This command should be run in your terminal or command prompt. ```bash pip install mailscout ``` -------------------------------- ### Initialize the Scout class Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Initialize the Scout class from the mailscout library. This is the primary object used for most functionalities. ```python from mailscout import Scout scout = Scout() ``` -------------------------------- ### Check for Catch-All Domains with Mailscout Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Determine if a domain is configured as a catch-all using the `check_email_catchall` method. A catch-all domain accepts emails for any address, even non-existent ones. ```python domain = "example.com" is_catchall = scout.check_email_catchall(domain) print(f"Domain {email} is catch-all: {is_catchall}") # Email xample.com is catch-all: True ``` -------------------------------- ### Find Business Emails with Names (Multiple People) Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Provide a list of lists, where each inner list contains strings for a person's name, to find emails for multiple individuals. ```python names = [["Jeff", "Winger"], ["Ben Cheng"], ["Łukas Nowicki"]] domain = "microsoft.com" emails = scout.find_valid_emails(domain, names) print(emails) # ['jeff@microsoft.com', 'ben.cheng@microsoft.com', 'bencheng@microsoft.com', 'ben@microsoft.com', 'lukas@microsoft.com'] ``` -------------------------------- ### Checking for Catch-All Domains Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Determines if a given domain is configured as a catch-all, meaning it accepts emails for any address. ```APIDOC ## check_email_catchall ### Description Checks if a domain is configured to accept emails for any address (catch-all). ### Method `check_email_catchall(domain: str) -> bool` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python domain = "example.com" is_catchall = scout.check_email_catchall(domain) print(f"Domain {domain} is catch-all: {is_catchall}") ``` ### Response #### Success Response (bool) - **is_catchall** (bool) - True if the domain is a catch-all, False otherwise. #### Response Example ``` True ``` ``` -------------------------------- ### Find Business Emails with Names (Single Name) Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Use `find_valid_emails` with a list of strings for first and last names to find a person's business email. ```python names = ["Batuhan", "Akyazı"] # or, names = ["Batuhan Akyazı"] domain = "example.com" emails = scout.find_valid_emails(domain, names) print(emails) # ['b.akyazi@example.com'] ``` -------------------------------- ### Find Business Emails in Bulk Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Utilize `find_valid_emails_bulk` to efficiently find email addresses for multiple domains and names by providing a list of task dictionaries. ```python email_data = [ {"domain": "example.com", "names": ["John Doe"]}, {"domain": "example.com", "names": ["Jane Smith"]}, {"domain": "example.com"} ] valid_emails = scout.find_valid_emails_bulk(email_data) print(valid_emails) # [{'domain': 'example.com', 'names': ['John Doe'], 'valid_emails': ['j.doe@example.com']}, {'domain': 'example2.com', 'names': ['Jane Smith'], 'valid_emails': ['j.smith@example2.com', 'jane.smith@example2.com']}, {'domain': 'example.com', 'valid_emails': ['info@example.com']}] ``` -------------------------------- ### Find Business Emails with Common Prefixes Source: https://github.com/batuhanaky/mailscout/blob/main/README.md When no names are provided, `find_valid_emails` uses brute force on common prefixes to discover email addresses for a given domain. ```python domain = "microsoft.com" emails = scout.find_valid_emails(domain) print(emails) # ['support@microsoft.com', 'team@microsoft.com', 'marketing@microsoft.com', 'accounts@microsoft.com', 'help@microsoft.com', 'finance@microsoft.com', 'manager@microsoft.com', 'events@microsoft.com', 'community@microsoft.com', 'feedback@microsoft.com', 'dev@microsoft.com', 'developer@microsoft.com', 'status@microsoft.com', 'security@microsoft.com'] ``` -------------------------------- ### Check SMTP Deliverability with Mailscout Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Use the `check_smtp` method to validate if an email address is deliverable via SMTP. This helps in determining the validity of an email address before sending. ```python email = "batuhan@microsoft.com" is_deliverable = scout.check_smtp(email) print(f"Email {email} is deliverable: {is_deliverable}") # Email batuhan@microsoft.com is deliverable: False ``` -------------------------------- ### Find Business Emails with Names (Single String) Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Pass a single string containing the full name to `find_valid_emails` to search for a specific person's email. ```python names = "Jeffrey Tobias Winger" domain = "microsoft.com" emails = scout.find_valid_emails(domain, names) print(emails) # ['winger.tobias@microsoft.com'] ``` -------------------------------- ### Normalize Names into Email-friendly Format Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Converts a given name into an email-friendly format, handling special characters and diacritics. ```APIDOC ## normalize_name ### Description Normalizes a name string into a format suitable for email addresses. ### Method `normalize_name(name: str) -> str` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python name1 = "Şule" name2 = "Dzirżyterg" normalized_name1 = scout.normalize_name(name1) normalized_name2 = scout.normalize_name(name2) print(normalized_name1) print(normalized_name2) ``` ### Response #### Success Response (str) - **normalized_name** (str) - The name normalized into an email-friendly format. #### Response Example ``` sule dzirzyterg ``` ``` -------------------------------- ### Check SMTP Deliverability (Email Validation) Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Validates an email address by checking its SMTP deliverability. Returns true if the email is likely deliverable, false otherwise. ```APIDOC ## check_smtp ### Description Checks if an email address is deliverable by verifying its SMTP status. ### Method `check_smtp(email: str) -> bool` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python email = "batuhan@microsoft.com" is_deliverable = scout.check_smtp(email) print(f"Email {email} is deliverable: {is_deliverable}") ``` ### Response #### Success Response (bool) - **is_deliverable** (bool) - True if the email is deliverable, False otherwise. #### Response Example ``` False ``` ``` -------------------------------- ### Normalize Names for Email Format Source: https://github.com/batuhanaky/mailscout/blob/main/README.md Convert non-compliant names into an email-friendly format using the `normalize_name` method. This ensures names are acceptable for email addresses. ```python name1 = "Şule" name2 = "Dzirżyterg" normalized_name1 = scout.normalize_name(name1) normalized_name2 = scout.normalize_name(name2) print(normalized_name1) # 'sule' print(normalized_name2) # 'dzirzyterg' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.