[Seaside] How to email

John Thornborrow john at pinesoft.co.uk
Thu Aug 2 15:27:18 UTC 2007


This is what I have used in the past to send emails after a user has 
completed a "contact us" form:

==
sendEmail
   from
     ifNotNil: [
       SMTPClient deliverMailFrom: from
         to: (self session application preferenceAt: #enquiriesEmail)
         text: 'Subject: ', subject,'
', body
         usingServer: (self session application preferenceAt: #mailServer).
       self redirectTo: '/home']
     ifNil: [self error: 'You have not specified a reply address'].
==

Note that the carriage return character is required between subject and 
body.

Hope this helps,

John

www.pinesoft.co.uk

Michel Bany wrote:
> 
> On 02 Aug 2007, at 16:59 , Richard Eng wrote:
> 
>> How do you send email from within Seaside? That is to say, you click 
>> on the submit button of an email form and it fires off an email to the 
>> specified email address.
>>
>> (Ages ago, I had a personal static webpage that contained an email 
>> form, but unfortunately I lost it and I forgot how I did it. Not that 
>> it would’ve translated well into Seaside, I suspect.)
>>
> 
> Richard,
> 
> You may want to have a look at class WAEmailConfirmation and its usages.
> 
> It is no longer in Seaside 2.8 but the corresponding know-how is still 
> available in Seaside 2.7b1 .
> 
> Cheers,
> Michel.
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



More information about the Seaside mailing list