What's ImprovMX? Incase you don't know ImprovMX is a email free/paid forwarding service.
test_create_and_delete_alias.mp4
- Create domain alias
- Bulk create domain alias
- Edit domain alias
- Delete domain alias
- Requests sessions
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="[email protected]", # The email address the alias forwards to.
bulk=False # Indicates whether to create aliases in bulk. Defaults to False.
)
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": "[email protected]"},
{"alias": "testalias2", "forward": "[email protected]"},
{"alias": "testalias3", "forward": "[email protected]"},
],
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.
)
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="[email protected]" # The new email address the edited alias forwards to.
)
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.
)
This project is licensed under the MIT License.