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

Any built in direct SMTP server?

 [1/5] from: sf:sabufrancis at: 11-Nov-2003 20:57


Hi: I am looking for an SMTP server written in Rebol itself. Also info regarding how to construct a multipart mime email message (Basically, I need to examine an earlier email, put some extra HTML inside the HTML portion of the email message and send the email back.) Any help for both these would be greatly appreciated More questions later :-) Thanks in advance Regards Sabu Francis

 [2/5] from: SunandaDH:aol at: 11-Nov-2003 10:44


Sabu:
> I am looking for an SMTP server written in Rebol itself.
I'm not sure there is a complete server, but there are chunks you could rerarrange in the Script Library. www.REBOL.org and do a Find for "smtp" Sunanda.

 [3/5] from: mattsmac:h:otmail at: 11-Nov-2003 11:23


Go to www.h-o-h.org/simtpop.r for a very general SMTP/POP server. You will need to edit it to fit your specific needs. I used this to make a MS Exchange SMTP Gateway to rout email messages sent from exchange through rebol and into a database. For the MIME info, check out http://www.faqs.org/rfcs/rfc-sidx21.html and look at RFCs 2045 - 2049. I got most of my info from there. Other than that, it's basically just parsing the email message for the headers you need to alter. HTH Matt ------------------------------------------------------ Hi: I am looking for an SMTP server written in Rebol itself. Also info regarding how to construct a multipart mime email message (Basically, I need to examine an earlier email, put some extra HTML inside the HTML portion of the email message and send the email back.) Any help for both these would be greatly appreciated More questions later :-) Thanks in advance Regards Sabu Francis _________________________________________________________________ Concerned that messages may bounce because your Hotmail account is over limit? Get Hotmail Extra Storage! http://join.msn.com/?PAGE=features/es

 [4/5] from: sf::sabufrancis::com at: 11-Nov-2003 23:08


Hi: Thanks for the links. Here is the problem I'm facing with HTML formatted emails The objective is to extract the HTML portion of the email; then add a footer to it just befor </BODY> and then send such a modified email back. What I 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 on the contents. (I know this is a very trivial and a simplistic approach but I am just getting to grips with this) Sadly, this approach does not work. I think the multpart boundaries must be getting upset because the html gets all garbled when it arrives back at the email client. I've tried using Brett Handley's excellent routines at www.codeconscious.com to get the structure of a mime-email. I know how to read the structure. But I havent figured out how to write back the structure after the modifications. Any help would be appreciated Regards Sabu

 [5/5] 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
on
> the contents. (I know this is a very trivial and a simplistic approach but
I
> am just getting to grips with this) > > Sadly, this approach does not work. I think the multpart boundaries must
be
> getting upset because the html gets all garbled when it arrives back at
the
> 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
www.codeconscious.com
> to get the structure of a mime-email. I know how to read the structure.
But
> 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.