Wiki

Case Status Kiln
Register Log In

Wiki

 
Delete Email Address
  • RSS Feed

Last modified on 10/17/2011 4:42 PM by User.

Tags:

Delete Email Address

deleteEmailAddress.py

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
"""
Delete Email Address

FogBugz stores a list of email addresses that have been used in cases
containing email messages. You can't delete these email addresses
from within FogBugz, but you can delete them using the FogBugz API.

How to use this script:
1. Change the value for EMAIL_ADDRESS and save the file
2. Run the script from the command line:
   
   python deleteEmailAddress.py


See https://developers.fogbugz.com/default.asp?W194 for more
information on using the FogBugz XML API with Python.
"""

EMAIL_ADDRESS = 'test@test.com'

from fogbugz import FogBugz
import fbSettings

#log onto FogBugz  
fb = FogBugz(fbSettings.URL, fbSettings.TOKEN)

resp = fb.deleteEmailAddress(sEmail=EMAIL_ADDRESS)
print 'Number of email addresses deleted: %s' % resp.emails['rows_affected']