[Seaside] sending emails

Ramon Leon ramon.leon at allresnet.com
Fri Jan 4 04:02:44 UTC 2008

> Hi Seaside,
> Can anyone enlighten me on how to send emails 
> programmatically from Squeak? Is there a mail server in 
> Squeak that can be used for this purpose as opposed to a 
> stand-alone third-party mail server?
> Many thanks in advance.
> Ching

Call MailSender setSmtpServer and configure your smtp host, then use
something like this...

        deliverMailFrom: 'some.from at address.com'
        to: {'bla at bla.com'. 'foo at bar.com'}
        text: (String streamContents: [:s | 
                nextPutAll: 'Subject: ' ;
                nextPutAll: 'Your Subject' ;
                cr ;
                nextPutAll: 'Content-type:' ;
                nextPutAll: 'text/html' ; "or text/plain"
                cr ; cr ;
                nextPutAll: 'Bla Bla Bla' ])

Ramon Leon

More information about the seaside mailing list