We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Send HTML Formatted Mail

fuluppi
fuluppi asked
on
Medium Priority
440 Views
Last Modified: 2012-05-04
hi!
i've got a customer database with about 3000 persons in it who want to receive my newsletter.
i would like to send personalized mails with the name and company name in it and the
mail should be html formatted. it would be best if there is a possibility to use an email editor
like ms outlook. i'm using delphi 6 enterprise. i can send simple mails with smtp but how can
i send and edit html formatted complicated mails with attachments and images in it ? is it
possible to send mails using outlook ? i've seen those components on the servers tab but
actually i don't know how to use them. something like

open outlook mail editor
type in my mail

from database:_
send mail to adress 1
send mail to adress 2
[...]

would be cool ;)

thanks
fuluppi
Comment
Watch Question

U can use the delphi Indy component from the Indy tab, to send mail,

TIdMessage.ContentType should be  "text/html; charset=us-ascii"

and you can send the whole HTML code in the body.

Look here for examples:

https://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20740992.html

there are also many examples on the Indy site

www.nevrona.com/indy

Shane
 

Author

Commented:
hi shane !
this seems to work, too. but how can i let my users create the mails ? i need
something like a wysiwyg mail editor. any ideas ?

thanks
fuluppi

Commented:
You can accomplish this (WYSIWYG HTML editing) by encapsulating the same editor used by Outlook - DHTMLEdit. There's plenty of stuff on the web about how to use it, including this site:

http://members.shaw.ca/iedelphi/dhtmledit.htm 

If you want to accomplish this without much learning curve or doing much coding:

www.profgrid.com/dhtmledit.html 
ProfDHTMLEdit. $99 with source. Delphi wrapper for the MS DHTML component. If it's well done, it's easily worth $99.

If for some reason you don't want to go the DHTMLEdit route, HTMLEdit is a native VCL component. It's a WYSISYG HTML editor. Looked cool. $139 US. www.purposesoft.com 

Regards,

Ron
"FeralCTO"
You use a TEdit for the To:

A TEdit for the From:

A TRichEdit for the message body

etc.

When they fill it all out, u assign all the values of the controls to the  indy component's properties at runtime.

Then send the mail

SHane
If you want them to be able to create HTML mail, then you need a Control which will allow this.

A third party RichEdit, or HTML control

Shane
Right, for the body text, i.e. HTML portion,  you will need a control such as dhtmledit as described by FeralCTO above.

Shane
Melih SARICA
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.