My code is as follows:

====

BuildAndSendMail>>deliverMailFrom: fromAddress to: recipientList text:
messageText
        SeasidePlatformSupport
                deliverMailFrom: fromAddress
                to: recipientList
                text: messageText

BuildAndSendMail>>send: model
        | recipients messageText subjectText bodyText headerText |
        recipients := self recipents: model.
        headerText := 'Content-Type: text/plain; charset=\"utf-8\"', String
crlf, 'Content-Transfer-Encoding: 8bit'.
        bodyText := (self messageTextForModel: model) convertToWithConverter:
UTF8TextConverter new.
        subjectText := 'Subject: ' , 'Ihre Kartenreservierung (' , Date
current asString , ')'.
        messageText := headerText, String crlf, subjectText , String crlf , 
bodyText.
        self
                deliverMailFrom:  '<[email protected]>'
                to: recipients
                text: messageText

====

For me the trick was  "convertToWithConverter: UTF8TextConverter new."
After adding this conversion my postfix server accepted the generated
mails. My defect happens only connecting from a unix host. Connecting
to the mail server from a windows host works fine.

Marco Schmidt


2009/11/14 Schwab,Wilhelm K <[email protected]>:
> Marco,
>
> Does that imply that you have had success otherwise?  How did you send the 
> mail?  I _think_ it ultimately goes through SMTPClient, but it's a real rats' 
> nest and I could be missing something.  Also, how did you create the message? 
>  Most of the examples seem to have the headers created "in the text" as 
> opposed to generating them from supplied aspects :(
>
> Interestingly, I am having trouble sending a plain-text message from Pharo.  
> I _have_ had success sending an attachment. I have not bothered to see if I 
> can read the result, but the server delivered it, and LookOut!! seems to 
> think there is something attached to the message.
>
> The weird thing is that my attemps to send plain text resulted in 
> (superficially at least) a reasonable conversation with the server (I added 
> enough tracing to see the sends and the server's responses).  The server 
> reports accepting the message for delivery, but it never arrrives.  I am 
> **reasonbly** certain my email address is correct, but obviously that is 
> something that needs to be re-re-re-checked.
>
> Something in Mantis made reference to <> around email addresses; I think it 
> was only in the case of multiple recipients, but it is worth a look.  The 
> server reports itself as sendmail, but it would not surprise me if it another 
> piece of Microsoft crap-ware that claims to be something it is not.
>
> Bill
>
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Schmidt, 
> Marco
> Sent: Friday, November 13, 2009 3:42 AM
> To: [email protected]
> Subject: Re: [Pharo-project] MailMessage
>
> I had a problem with Email and the character encoding. Sending mail with the 
> character 'ÄÖÜ' inside the mail body killed the mail server. So - look at 
> correct encoding of the message text.
>
> Marco Schmidt
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected] 
> [mailto:[email protected]] Im Auftrag von 
> Schwab,Wilhelm K
> Gesendet: Freitag, 13. November 2009 01:29
> An: [email protected]
> Betreff: [Pharo-project] MailMessage
>
> Hello all,
>
> I am looking for a way to format text in email.  Html comes to mind (yes, I 
> hate those emails too, but it would work and the recipients don't know any 
> better<g>), as does attaching a file with the data.
>
> I recently had to switch smtp servers, and for whatever reason, can no longer 
> send html email.  The server says it accepted it, but the mail is never 
> delivered; send plain text through it, and it works.
>
> It could simply be that the server wants no part of html email, but it would 
> be nice to repeat the test with another client, and/or try attachments as a 
> solution to my problem.  I found MailMessage, and could not figure out how to 
> set the recipient.
>
> After some searching, I found 151 on Mantis; it is a five year old fix from 
> Frank Shearer for adding recipients.  If I had to guess, things are still 
> broken, but I will try it and see what happens.  Sending this now while I'm 
> thinking about it.
>
> If anybody knows a way around my current problems, please don't feel that you 
> would be cheating me out of the fun of solving it myself :)
>
> Bill
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to