Skip to content

ImInTheICU/ImprovMX-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1ccb738 Β· Mar 26, 2024

History

19 Commits
Mar 8, 2024
Mar 26, 2024
Mar 8, 2024
Mar 8, 2024

Repository files navigation

🐍 ImprovMX-Python

ImprovMX-Python

What's ImprovMX? Incase you don't know ImprovMX is a email free/paid forwarding service.

πŸš€ Showcase

test_create_and_delete_alias.mp4

🧐 Features

  • Create domain alias
  • Bulk create domain alias
  • Edit domain alias
  • Delete domain alias
  • Requests sessions

βœ‚πŸ”¨ Usage

-> Create domain alias

from ... import ImprovMX # ... being the file with the ImprovMX class in it.

improvMX = ImprovMX(api_user="<api_user>", api_key="<api_key>") # <api_user> being the api user (default: api) # <api_key> being the api key (get one: https://app.improvmx.com/api)

improvMX.create_alias(
    domain="example.com", # The domain for which to create the alias. (must be added at https://app.improvmx.com/)
    alias="test", # The alias or list of aliases to be created. (in this example we're added a single alias)
    forward="test@gmail.com", # The email address the alias forwards to.
    bulk=False # Indicates whether to create aliases in bulk. Defaults to False.
)

-> Bulk create domain alias

from ... import ImprovMX # ... being the file with the ImprovMX class in it.

improvMX = ImprovMX(api_user="<api_user>", api_key="<api_key>") # <api_user> being the api user (default: api) # <api_key> being the api key (get one: https://app.improvmx.com/api)

improvMX.create_alias(
    domain="example.com", # The domain for which to create the alias. (must be added at https://app.improvmx.com/)
    alias=[ # The alias or list of aliases to be created. (in this example we're added a single alias)
        {"alias": "testalias1", "forward": "test1@gmail.com"}, 
        {"alias": "testalias2", "forward": "test2@gmail.com"},
        {"alias": "testalias3", "forward": "test3@gmail.com"},
    ],
    bulk=True, # Indicates whether to create aliases in bulk. Defaults to False.
    bulkBehavior="update" # The behavior when creating aliases in bulk. Can be "add" or "update". Defaults to None.
)

-> Edit domain alias

from ... import ImprovMX # ... being the file with the ImprovMX class in it.

improvMX = ImprovMX(api_user="<api_user>", api_key="<api_key>") # <api_user> being the api user (default: api) # <api_key> being the api key (get one: https://app.improvmx.com/api)

improvMX.edit_alias(
    domain="example.com", # The domain for which the alias belongs.
    alias="test", # The existing alias to be edited.
    forward="newexample@test.com" # The new email address the edited alias forwards to.
)

-> Delete domain alias

from ... import ImprovMX # ... being the file with the ImprovMX class in it.

improvMX = ImprovMX(api_user="<api_user>", api_key="<api_key>") # <api_user> being the api user (default: api) # <api_key> being the api key (get one: https://app.improvmx.com/api)

improvMX.delete_alias(
    domain="example.com", # The domain from which to delete the alias.
    alias="test", # The existing alias to be deleted.
)

πŸ›‘οΈ License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published

Languages