message.Body = "Dear " + myds.Tables[0].Rows[0].Field<string>("C_Name").ToString()
+ " <br /> <br /> Your Registrtion is Successfull...<br/><br/>
<table border='4'><tr><td>Name = "
+ myds.Tables[0].Rows[0].Field<string>("C_Name").ToString()
+ " </td><td> Pax= "
+ myds.Tables[1].Rows[0].Field<int>("pax").ToString()
+ "</td> </tr><tr><td>Della Adventure,Kunegao,Lonavala</td><td>CheckIn Date= "
+ myds.Tables[0].Rows[0].Field<string>("Checkin_date").ToString()
+ "</td></tr></table>";
This is my code and I want to add image in the message body.
Pravesh Singh
23-Dec-2013Use image tag to display the image in you body of the mail.
Instead of storing the image in to DB.Do the following steps
Just upload the image in to you're server location.
Store the image path in to DB
Get the image path from DB and bind it to image source.
For Example.
<img height="" width="" border="0" alt="" src="https://www.xyz.com/images/123.jpg"></img>
Bindling the image URL
<tr><td> <img height="" width="" border="0" alt=" src="+ myds.Tables[1].Rows[0].Field<string>("imageurl").ToString() + "></img></td> </tr>
Your entire code could be: