Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
I have 3 data in a database.. i want to send it one by one to defined email id in DB.. Mean that... 1st value assigned to xyz@xyz.com,2nd value assigned to abc@abc.com then third value assigned to again xyz@xyz.com.

question is ... how to do this?
i have no idea:(
Posted
Updated 4-Dec-14 1:56am
v3
Comments
Thanks7872 3-Dec-14 2:38am    
And? Where is the question?
Member 11282091 3-Dec-14 3:09am    
question is ... how to do this?
i have no idea:(
syed shanu 3-Dec-14 3:12am    
Check this link.
Very simple and easy to use console program to send mail.
http://www.codeproject.com/Tips/301836/Simple-SMTP-E-Mail-Sender-in-Csharp-Console-applic

You have to add your logic here to get email from db and send
Member 11282091 3-Dec-14 3:18am    
Thanks, I have my own code to send mail.. but want to send data one by one to user...
i Developed code its sending mail properly..
syed shanu 3-Dec-14 3:33am    
Select data from db to datareader or dataTable or to Dataset.
Inside loop call your send mail function and pass email address to funtion.its simple.

1 solution

Hi,

How about searching for solutions to your problems first and then asking people to help if you really stuck on something.
1. Reading and inserting data from/to database is basic skill you have to learn:
SQL in ten minutes[^]
http://www.dotnetperls.com/sqldatareader[^]
2. Loops: http://csharp.net-tutorials.com/basics/loops/[^]

Cheers!
 
Share this answer
 
Comments
Member 11282091 3-Dec-14 7:06am    
Thanks :)
Marcin Kozub 3-Dec-14 10:58am    
Glad I could help you. It would be nice to accept solution if it was helpul, to tell other people that this particular problem was solved and to appreciate the person who helped you ;)
Member 11282091 4-Dec-14 2:36am    
hey.. Thanks a lot for ur suggestion... Its really help me.
Thanks Marcin Kozub ji.. Thanks a lot .... :) :)

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