Add a new SMTP User
Example Call
try:
import PowerEmail
PowerEmail_client = PowerEmail.PowerEmail( 'owner_id', 'token', 'PowerEmailTES_APP_DOMAIN')
result = PowerEmail_client.settings.addSmtpUser(total_limit=500, hourly_limit=200)
print result
'''
{
"status" : "success",
"message" : "SMTP User Created",
"smtp_user_name" : "smtp12345",
"smtp_password" : "asfsf4w343"
}
'''
except PowerEmail.Error, e:
# PowerEmailerrors are thrown as exceptions
print 'A PowerEmailerror occurred: %s - %s' % (e.__class__, e)
Example Success Response
{
"status" : "success",
"message" : "SMTP User Created",
"smtp_user_name" : "smtp12345",
"smtp_password" : "asfsf4w343",
}
Example Error Response
{
"status": "error",
"code": "-1",
"name": "AuthenticationError",
"message": Token MissMatch,
}
Parameters | |
---|---|
owner_id* string | a valid PowerEmailUser Id |
token* string | a valid token |
PowerEmailTES_APP_DOMAIN* string | a valid PowerEmailTES APP DOMAIN |
total_limit* integer | positive digit |
hourly_limit* integer | positive digit |
* compulsory field
Return Value: Success | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Return Value: Error | ||||||||
---|---|---|---|---|---|---|---|---|
|
Error types | |
---|---|
ValidationError | The parameters passed to the API call are invalid or not provided when required. |
GeneralError | An unexpected errors occurred processing the request. PowerEmailDevelopers will be notified. |
AuthenticationError | Provided owner_id and token was not matched. |
Edit SMTP User
Example Request
try:
import PowerEmail
PowerEmail_client = PowerEmail.PowerEmail( 'owner_id', 'token', 'PowerEmailTES_APP_DOMAIN')
result = PowerEmail_client.settings.editSmtpUser(smtp_user_name="smtp12345", total_limit=1000, hourly_limit=None,status="Enable")
print result
'''
{
"status" : "success",
"message" : "SMTP User Updated"
}
'''
except PowerEmail.Error, e:
# PowerEmailerrors are thrown as exceptions
print 'A PowerEmailerror occurred: %s - %s' % (e.__class__, e)
Example Response
{
"status": "success",
"message": "SMTP User Updated",
}
Example Error Response
{
"status": "error",
"code": "-1",
"name": "AuthenticationError",
"message": Token MissMatch,
}
Parameters | |
---|---|
owner_id* string | a valid PowerEmailUser Id |
token* string | a valid token |
PowerEmailTES_APP_DOMAIN* string | a valid PowerEmailTES APP DOMAIN |
smtp_user_name* string | a valid smtp user name |
total_limit* integer | positive digit |
hourly_limit integer | positive digit |
status string | value of status is Either 'Enable' OR 'Disable' |
* compulsory field
Return Value: Success | ||||||
---|---|---|---|---|---|---|
|
Return Value: Error | ||||||||
---|---|---|---|---|---|---|---|---|
|
Error types | |
---|---|
ValidationError | The parameters passed to the API call are invalid or not provided when required. |
GeneralError | An unexpected errors occurred processing the request. PowerEmailDevelopers will be notified. |
AuthenticationError | Provided owner_id and token was not matched. |
Password Reset for SMTP user
Example Request
try:
import PowerEmail
PowerEmail_client = PowerEmail.PowerEmail( 'owner_id', 'token', 'PowerEmailTES_APP_DOMAIN')
result = PowerEmail_client.settings.resetSmtpPassword(smtp_user_name="smtp12345")
print result
'''
{
"status" : "success",
"message" : "password reseted",
"smtp_user_name" : "smtp12345",
"smtp_password" : "asfsf4w343"
}
'''
except PowerEmail.Error, e:
# PowerEmailerrors are thrown as exceptions
print 'A PowerEmailerror occurred: %s - %s' % (e.__class__, e)
Example Success Response
{
"status": "success",
"message": "password reseted",
"smtp_user_name": "smtp12345",
"smtp_password": "2fg345gy6r7",
}
Example Error Response
{
"status": "error",
"code": "-1",
"name": "AuthenticationError",
"message": Token MissMatch,
}
Parameters | |
---|---|
owner_id* string | a valid PowerEmailUser Id |
token* string | a valid token |
PowerEmailTES_APP_DOMAIN* string | a valid PowerEmailTES APP DOMAIN |
smtp_user_name* string | a valid smtp user name |
* compulsory field
Return Value: Success | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Return Value: Error | ||||||||
---|---|---|---|---|---|---|---|---|
|
Error types | |
---|---|
ValidationError | The parameters passed to the API call are invalid or not provided when required. |
GeneralError | An unexpected errors occurred processing the request. PowerEmailDevelopers will be notified. |
AuthenticationError | Provided owner_id and token was not matched. |
List SMTP users
Example Request
try:
import PowerEmail
PowerEmail_client = PowerEmail.PowerEmail( 'owner_id', 'token', 'PowerEmailTES_APP_DOMAIN')
result = PowerEmail_client.settings.listSmtp()
print result
'''
{
"status" : "success",
"smtp_list" : [
{
"smtp_user_name" : "smtps456546",
"password" : "cgvddgrsd",
"status" : "Enable",
"total_limit" : 1000,
"hourly_limit" : 600
},
{
"smtp_user_name" : "smtps456567",
"password" : "fdsdfs",
"status" : "Disable",
"total_limit" : 100,
"hourly_limit" : 30
}
]
}
'''
except PowerEmail.Error, e:
# PowerEmailerrors are thrown as exceptions
print 'A PowerEmailerror occurred: %s - %s' % (e.__class__, e)
Example Response
{
"status": "success",
"smtp_list": [
{
"smtp_user_name": "smtps456546",
"smtp_password": "cgvddgrsd",
"status": "Enable",
"total_limit": 1000,
"hourly_limit": "20"
},
{
"smtp_user_name": "smtps456567",
"smtp_password": "fdsdfs",
"status": "Disable",
"total_limit": 100,
"hourly_limit": 30
}
]
}
Example Error Response
{
"status": "error",
"code": -1,
"name": "AuthenticationError",
"message": Token MissMatch,
}
Parameters | |
---|---|
owner_id* string | a valid PowerEmailUser Id |
token* string | a valid token |
PowerEmailTES_APP_DOMAIN* string | a valid PowerEmailTES APP DOMAIN |
* compulsory field
Return Value: Success | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Return Value: Error | ||||||||
---|---|---|---|---|---|---|---|---|
|
Error types | |
---|---|
ValidationError | The parameters passed to the API call are invalid or not provided when required. |
GeneralError | An unexpected errors occurred processing the request. PowerEmailDevelopers will be notified. |
AuthenticationError | Provided owner_id and token was not matched. |