Click here to Skip to main content
15,904,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C# code which works in mailing out emails - up to 100+ emails per day- however, I would like to the code where it also added specific user details in the email.
For example, it should read some like

'Dear [person's name], thanks for taking part in the event held on the [date] at [venue], please email us with any feedback.....etc'

where the [person's name], [date] and [venue] is data held in a table.
Am I making sense?
The database holding the email address/names/dates etc is stored in a SQL Server2008, and I m using C# windows forms code within Microsoft Outlook 2007.

so how to make email template with database fields(<<name>>,<<date>>).which i will add to mailmessage body in the outlook2007

Any help/information would be grand!!

Thanks in advance
Posted

C# code which works...

No. It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
 
Share this answer
 
1) Write code that can send an email package. That will become a Send() method...
2) Write code that loads your email template and substitutes the individual information and then sends the email via the method(s) written in step 1.
3) Write code that loops through all the records from your database to which you want to send mail. For each item you find, process them through the method(s) written in step 2.
4) Come back with any specific issues you find while writing the code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900