[Zope] patch for worldpilot to add 'imapserver' and 'smtpserver' options.
Anthony Baxter
anthony@ekit-inc.com
Mon, 31 Jan 2000 17:06:23 +1100
This is a multipart MIME message.
--==_Exmh_12796387400
Content-Type: text/plain; charset=us-ascii
The attached patch changes the 'add WorldPilot' screen to have options
for 'imapserver' and 'smtpserver'. I've pretty brutally hacked the code
to pass this through to the appropriate bits of the system where required.
It seems to Work For Me.
Anthony
--==_Exmh_12796387400
Content-Type: text/plain; name="wp.diff"; charset=us-ascii
Content-Description: patch_for_worldpilot
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="wp.diff"
UkNTIGZpbGU6IC9jdnNyb290L1dvcmxkUGlsb3QvV29ybGRQaWxvdC5weSx2CnJldHJpZXZp
bmcgcmV2aXNpb24gMS4xLjEuMQpkaWZmIC11IC1yMS4xLjEuMSBXb3JsZFBpbG90LnB5Ci0t
LSBXb3JsZFBpbG90LnB5CTIwMDAvMDEvMjggMDU6MzU6NTIJMS4xLjEuMQorKysgV29ybGRQ
aWxvdC5weQkyMDAwLzAxLzMxIDA0OjMzOjAzCkBAIC0yODEsMTIgKzI4MSwxMyBAQAogCiBj
bGFzcyBMb2dvbjoKIAl1c2VkVUlEcz17fQotCWRlZiBfX2luaXRfXyhzZWxmLFVzZXIsUGFz
c3dkLElQKToKKwlkZWYgX19pbml0X18oc2VsZixVc2VyLFBhc3N3ZCxJUCxpbWFwc2VydmVy
KToKICAgICAgICAgCXNlbGYuVXNlcj1Vc2VyCiAgICAgICAgICAgICAgICAgc2VsZi5QYXNz
d2Q9UGFzc3dkCiAgICAgICAgICAgICAgICAgc2VsZi5JUD1JUAogICAgICAgICAgICAgICAg
IHNlbGYuQ2FjaGVzPXt9CiAgICAgICAgICAgICAgICAgc2VsZi5VSUQ9c2VsZi5nZW5VSUQo
KQorICAgICAgICAgICAgICAgIHNlbGYuaW1hcHNlcnZlcj1pbWFwc2VydmVyCiAgICAgICAg
ICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAg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