email with seaside

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

email with seaside

Simon De Baets
Hi,

I use seaisde 3, and i want send email with this code :

|msg|
MailSender setSmtpServer.
msg := (MailMessage new setField: 'to' to: '[hidden email]';
setField: 'from' to: '[hidden email]';
setField: 'subject' to: 'Hello from MailMessage!';
body: 'Sending from MailMessage'; yourself).
(MailComposition new sendMailMessage: msg) submit.

but it doesn't function.  Seaside give this error : "MessageNotUnderstood : ByteString>>asHeaderValue. In fact the error is localize on line : (MailComposition new sendMailMessage: msg) submit. The wrong part of this line is sendMailMessage: msg. Why?

Thanks,
Simon

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: email with seaside

Philippe Marschall
2010/10/17 Simon De Baets <[hidden email]>:

> Hi,
>
> I use seaisde 3, and i want send email with this code :
>
> |msg|
> MailSender setSmtpServer.
> msg := (MailMessage new setField: 'to' to: '[hidden email]';
> setField: 'from' to: '[hidden email]';
> setField: 'subject' to: 'Hello from MailMessage!';
> body: 'Sending from MailMessage'; yourself).
> (MailComposition new sendMailMessage: msg) submit.
>
> but it doesn't function.  Seaside give this error : "MessageNotUnderstood :
> ByteString>>asHeaderValue. In fact the error is localize on line :
> (MailComposition new sendMailMessage: msg) submit. The wrong part of this
> line is sendMailMessage: msg. Why?

The second argument of #setField:to: must be a MIMEHeaderValue, not a String.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: email with seaside

Simon De Baets
Hi,

How can i transform an email address in MIME header Value?

Thanks,
Simon


2010/10/17 Philippe Marschall <[hidden email]>
2010/10/17 Simon De Baets <[hidden email]>:
> Hi,
>
> I use seaisde 3, and i want send email with this code :
>
> |msg|
> MailSender setSmtpServer.
> msg := (MailMessage new setField: 'to' to: '[hidden email]';
> setField: 'from' to: '[hidden email]';
> setField: 'subject' to: 'Hello from MailMessage!';
> body: 'Sending from MailMessage'; yourself).
> (MailComposition new sendMailMessage: msg) submit.
>
> but it doesn't function.  Seaside give this error : "MessageNotUnderstood :
> ByteString>>asHeaderValue. In fact the error is localize on line :
> (MailComposition new sendMailMessage: msg) submit. The wrong part of this
> line is sendMailMessage: msg. Why?

The second argument of #setField:to: must be a MIMEHeaderValue, not a String.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: email with seaside

Philippe Marschall
2010/10/18 Simon De Baets <[hidden email]>:
> Hi,
>
> How can i transform an email address in MIME header Value?

See on the class side of MIMEHeaderValue in the 'instance creation' protocol.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside