?
Solved

How to send a HTML-file including images with idSMTP (INDY)?

Posted on 2011-09-14
2
Medium Priority
?
597 Views
Last Modified: 2012-05-12
Hi,

Is there a WPTools way to generate HTML-files (including images), I need to be able to load the HTML-files into the body of the Email.
Also I need to personalise the HTML-body for each customer before sending it.

i.e.
Dear %mynamefield%    -> replace ->  Dear George

Thank you for your help.
0
Comment
Question by:Delphiwizard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
epasquier earned 2000 total points
ID: 36539979
ahh Google... what a wonderful tool :o)

http://codenewsfast.com/isapi/isapi.dll/article?id=4507106B&article=6979409
http://www.indyproject.org/Sockets/Blogs/RLebeau/2005_08_17_A.en.aspx

after this line :
Body.LoadFromFile(Folder + 'htmlmail.htm');

add this for name replacement
aStr:=Body.Text;
aStr:=StringReplace(aStr, %customer_firstname%, Customer_FirstName, [rfReplaceAll,rfIgnoreCase]);
aStr:=StringReplace(aStr, %customer_lastname%, Customer_LastName, [rfReplaceAll,rfIgnoreCase]);
Body.Text:=aStr;

with Customer_FirstName,Customer_LastName:String as parameters

Open in new window

0
 

Author Closing Comment

by:Delphiwizard
ID: 36540818
Perfect, thank you very much.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question