Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Any built in direct SMTP server?

From: brett:codeconscious at: 12-Nov-2003 11:34

Hi Sabu,
> was doing is that once I detect that the email does not have a > content-type:text/plain then I search for </BODY> and do the replacement
> the contents. (I know this is a very trivial and a simplistic approach but
> am just getting to grips with this) > > Sadly, this approach does not work. I think the multpart boundaries must
> getting upset because the html gets all garbled when it arrives back at
> email client.
Usually HTML is encoded in a quoted-printable encoding when it is put into a mime email message. In this case, to carry out your approach, you should decode the quoted-printable HTML (which my routines do), do your text replacement based on </BODY>, then encode the result using the quoted-printable encoding and replace that part in the original email. Then hope, that the multipart boundary is still valid (ie it is not part of your new quoted-printable encoded HTML). The content-transfer-encoding header will tell you if you have quoted-printable encoded data.
> I've tried using Brett Handley's excellent routines at
> to get the structure of a mime-email. I know how to read the structure.
> I havent figured out how to write back the structure after the > modifications. Any help would be appreciated
Umm, yeah I never quite got around to the writing back part. :-/ Regards, Brett.