Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rich Text to e-mail body (HTML)

1,822 views
Skip to first unread message

PB User

unread,
Oct 19, 2009, 3:40:15 PM10/19/09
to
I'd like to be able to take the contents of a rich-text control, and send it
via SMTP e-mail. I'd like to have the rich-text be the body of the e-mail
(no attachment). My thinking is that the rich-text should be converted to
HTML first, so it can be sent as an HTML e-mail. I already know how to send
SMTP e-mails.

Ideally, I'd like to avoid purchasing the 3rd party softwares I saw that can
convert rich-text to HTML. Is there a native PBuilder way to do this? Or any
other ideas how I can accomplish what I want (send rich-text within the body
of an e-mail, via smtp).

Roland Smith [TeamSybase]

unread,
Oct 19, 2009, 10:29:12 PM10/19/09
to
What version of PowerBuilder are you using? PB 10.5 and higher you can use
the SaveDocument function of the rtf control to save as html. Then you could
read the file back in and use it as the email body.

This example shows how to send email via SMTP:
http://www.topwizprogramming.com/freecode_emailsmtp.html

"PB User" <pbu...@none.com> wrote in message news:4adcc09f$1@forums-1-dub...

Jeremy Lakeman

unread,
Oct 19, 2009, 11:05:55 PM10/19/09
to

Do you *have* to edit the content as rich text? have you considered
using the microsoft web browser control in edit mode?

Dan Cooperstock

unread,
Oct 20, 2009, 8:38:13 AM10/20/09
to
Jeremy Lakeman <jeremy....@gmail.com> wrote in
news:c6f11d4d-1760-4e01...@d34g2000vbm.googlegroups.com:

> Do you *have* to edit the content as rich text? have you considered
> using the microsoft web browser control in edit mode?

That's what I do for mail merge in my product, and it works quite well.
However, so far I'm only using it for print mail merges, not email. I'm a
bit worried that the HTML generated by IE's edit mode (which is actually
called "design mode") may not be very simple HTML, and may not display well
in all email clients.

---------------------------
Dan Cooperstock
DONATION web site: http://www.Software4Nonprofits.com
DONATION Support forums: http://forums.Software4Nonprofits.com
Email: mailto:in...@Software4Nonprofits.com
Phone: 416-423-7722

PB User

unread,
Oct 20, 2009, 10:35:46 AM10/20/09
to
Thanks, the SaveDocument function to save rtf control to html is the missing
step I was looking for. Hopefully it's then easy to take the HTML and embed
it within the body of the e-mail.

"Roland Smith [TeamSybase]" <topwiz.smith_at_comcast_dot_net> wrote in
message news:4add2078$1@forums-1-dub...

Roland Smith [TeamSybase]

unread,
Oct 20, 2009, 12:02:17 PM10/20/09
to
The WebBrowser example on my website shows how to use it in entry mode.

http://www.topwizprogramming.com/freecode_webbrowser.html

Then they could transfer the html directly from the browser to the smtp
object.

"Jeremy Lakeman" <jeremy....@gmail.com> wrote in message
news:c6f11d4d-1760-4e01...@d34g2000vbm.googlegroups.com...

0 new messages