WebFaction
Community site: login faq

I'm using a Django build. I'm using the Webfaction API to automate the creation and management of email addresses. I am getting an error when I use "server.update_email" to turn on or turn off autoforwarding.

When I use:

server = xmlrpclib.ServerProxy('https://api.webfaction.com/')
session_id, account = server.login(REDACTED)
emailaddy = 'example@domain.com'
target = 'inboxQ'
server.update_email(session_id,emailaddy,target,'autoresponder_on=False')

I get an error

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1199, in __call__
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1489, in __request
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1253, in request
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 838, in close 
xmlrpclib.Fault: <Fault 1: 'autoresponder_on: You must specify and autoresponder subject and message to enable the autoresponder'>

My Question

How should I be using the API to update an email address when I want to remove the autoresponder? I believe this is a recent bug - it did not show in QA testing when the code was first tested a couple of months ago. Perhaps something changed in the API?

asked 07 Jul '11, 11:02

J Chung
54
accept rate: 0%


The update_email() API function takes a boolean argument for the autoresponder_on parameter, but you are passing a string containing the text "autoresponder_on=False". In other words, it should be:

server.update_email(session_id,emailaddy,target,autoresponder_on=False)

instead of:

server.update_email(session_id,emailaddy,target,'autoresponder_on=False')

More concisely, since autoresponder_on is already the fourth parameter, you can just use server.update_email(session_id,emailaddy,target,False).

Hope that helps

permanent link

answered 07 Jul '11, 19:32

ryans ♦♦
5.0k93360
accept rate: 43%

@ryans Thanks - that does solve my problem!

(07 Jul '11, 19:40) J Chung
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×261
×75
×1

question asked: 07 Jul '11, 11:02

question was seen: 2,432 times

last updated: 07 Jul '11, 19:40

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM