Solved

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

Posted on 2011-09-14
2
591 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 500 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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 …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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