[Seaside] Re: Handling errors - staging/production

Yanni Chiu yanni at rogers.com
Thu Jun 2 05:56:45 UTC 2011

On 02/06/11 1:00 AM, Ramon Leon wrote:
> On 06/01/2011 09:50 PM, John Toohey wrote:
>> Seaside has an abstract class, WAEmailErrorHandler that will email the
>> stack traces. Just found it, but when I ran my app with a handler
>> based on that, it prompted for an SMTP server, which I gave it, but
>> not password/account info. The code called then failed contacting the
>> server, but I cannot find where in the image to change the credentials
>> for the SMTP server.
> There are none, it's expecting an open SMTP server on your local
> network, not one that requires authentication on the net.

I add this method to my image:

SMTPClient class>>deliverMailFrom: fromAddress to: recipientList text: 
messageText usingServer: serverName user: user password: password

   | smtpClient |
   smtpClient := self openOnHostNamed: serverName.
   smtpClient user: user.
   smtpClient password: password.
   [smtpClient login.
   smtpClient mailFrom: fromAddress to: recipientList text: messageText.
   smtpClient quit]
     ensure: [smtpClient close]

I thought I was the only one that needed it.
Should it be added to Pharo/Squeak?

More information about the seaside mailing list