Home  »  Forum  »  ASP.Net  »

how to send mail inside html coding

 Posted By : chandru MPosted Date : 09/08/2011 08:00:40 PM Category : ASP.Net Points : 1

Dear all,
am using this coding but not displayed in tables and images only display in text. i want tables and images display format
MailMessage msg = new MailMessage();
SmtpClient c = new SmtpClient();
int bookId;
bookId = BookerEmailid(BookerName);
msg.From = new MailAddress("[email protected]");
msg.To.Add(new MailAddress(ToID));
msg.Subject = "Welcome to the Clickandbookonline.com your Booking Confirmation Details";
strBodymsg += "<div " + txtBooking.Text + "</br>";
strBodymsg += "<html><body =style type=text/css;body{margin:0px; background-color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:11px;}.find{font-family:Arial, Helvetica, sans-serif; font-size:12px;}.bookno{ font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;}.titlename{ font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:bold; color:#1e4883;}.tex-ar{font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; line-height:20px;}.email a{color:#9bbc54; text-decoration:underline;}.email a:hover{color:#9bbc54; text-decoration: none;}</style>";
strBodymsg += "<table width=573 height=479 border=0 cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>";
strBodymsg += "<tr><td height=49><img src=images/email-index_01.jpg width=43 height=49></td>";
strBodymsg += "<td height=49 background=images/top-bg.jpg> </td>";
strBodymsg += "<td><img src=images/email-index_03.jpg width=41 height=49></td></tr>";
strBodymsg += "<tr><td background=images/left-bg.jpg> </td><td width=559 height=806 valign=top>";
strBodymsg += "<div align=left><a href=http://www.clickandbookonline.com><img src=images/email-temp-logo.jpg width=335 height=64 border=0></a></div>";
strBodymsg += "<div class="find">Find the details of your booking made through Clickandbookonline.com." + lblNights.Text + "Please check your booking details below</div><br>";
strBodymsg += "<div class="bookno"> Your Booking Confirmation no is: CB" + bookId + "</div><br>";
strBodymsg += "<div class="titlename"> Details of Your Room Booking:</div><br>";
strBodymsg += "<div class="tex"-ar>Hotel name:" + lblHotelname.Text + " <br>";
strBodymsg += "Hotel Address:" + lblAddress.Text + "<br>";
strBodymsg += "Hotel Contact No: 044- 4218 9999<br>";
strBodymsg += "Hotel Email Id: [email protected]<br>";
strBodymsg += "Room type: " + lblRoom.Text + "<br>";
strBodymsg += "Arrival Date: " + lblSdate.Text + "<br>";
strBodymsg += "No of Nights: " + lblNights.Text + "<br>";
strBodymsg += "No of Rooms: " + lblRoom.Text + "<br>";
strBodymsg += "Booked By: " + txtSname.Text + "<br>";
strBodymsg += "Booker email: <span class="email">" + txtEmailId.Text + "</span></div><br>";
strBodymsg += "<div class="titlename">Paymant Details</div><br>";
strBodymsg += "<div class="tex"-ar>You have used the following card details to reserve your room(s) at " + lblHotelname.Text + ",<br>";
strBodymsg += "Card holder name: " + txtCHname.Text + "<br>";
strBodymsg += "Card Type: " + ddlCardtype.SelectedItem.ToString() + "<br>";
strBodymsg += "Card Number: " + txtCardNo.Text + "<br>";
strBodymsg += "Expiry Date: " + txtMM.Text + "/" + txtYY.Text + "<br>";
strBodymsg += "Start Date: " + txtStartdate.Text + "<br>";
strBodymsg += "Arrival Time: " + ddlArrivaltime.SelectedItem.ToString() + "</div><br>";
strBodymsg += "<div class="titlename">Room Cancelllation Policy :</div><br>";
strBodymsg += "<div class="find">A Credit/debit card is required to secure your reservation at your booked Hotel.<br>";
strBodymsg += "There will be no cancellation charge if a booking is cancelled before 10:00 hotel<br>";
strBodymsg += "local time 2 days before your date of arrival. if the booking is cancelled later, or in the case of a no-show, the first night will be charged. if you booked your room<br>";
strBodymsg += "without your credit/debit card details, then please forward your credit card details<br>";
strBodymsg += "to hotel email id with reference with room confirmation mail to hold your<br>";
strBodymsg += "recervation on a confirmed basis</div><br>";
strBodymsg += "<div class="tex"-ar>If you change a booking, amend or Cencel please send an email to<br>";
strBodymsg += "<span class="email"><a href=mailto:[email protected]>[email protected]</a> </span>with your booking confirmation no.<br>";
strBodymsg += "Have a happy and sae journey!!!!</div><br>";
strBodymsg += "<div class="titlename"> With Best Regards,</div><br>";
strBodymsg += "<div class="titlename"> Click & Book Team</div></td>";
strBodymsg += "<td background=images/right-bg.jpg> </td></tr>";
strBodymsg += "<tr>";
strBodymsg += "<td><img src=images/email-index_07.jpg width=43 height=46></td>";
strBodymsg += "<td width=559 background=images/bot-bg.jpg> </td>";
strBodymsg += "<td><img src=images/email-index_09.jpg width=41 height=46>";
strBodymsg += "</td>";
strBodymsg += "</tr>";
strBodymsg += "</table>";
strBodymsg += "</body>";
strBodymsg += ("</Html>");
strBodymsg += "</div>";
strBodymsg += "<br><br>With Best Regards,<br>[email protected]<br><a href=http:[email protected]</a>";
msg.IsBodyHtml = true;
msg.Body = strBodymsg;
msg.BodyEncoding = System.Text.Encoding.UTF8;
c.Host = "69.65.55.176";
c.Port = 25;
c.UseDefaultCredentials = true;
c.Credentials = new System.Net.NetworkCredential("[email protected]", "e4k2t9ey");
c.Send(msg);
ClientScript.RegisterStartupScript(this.GetType(), "aa", "<script>alert('Ur Booking is Successfully !');</script>");
 

Responses
 Author : Manoranjan Sahoo Member Level : BronzeDate : 10/08/2011 07:48:24 AM Points : 4

use below code instead of your existing one.

MailMessage msg = new MailMessage();
SmtpClient c = new SmtpClient();
int bookId;
bookId = BookerEmailid(BookerName);
msg.From = new MailAddress("[email protected]");
msg.To.Add(new MailAddress(ToID));
msg.Subject = "Welcome to the Clickandbookonline.com your Booking Confirmation Details";
strBodymsg += "<html><head><style type=\"text/css\">body{margin:0px; background-color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:11px;}.find{font-family:Arial, Helvetica, sans-serif; font-size:12px;}.bookno{ font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;}.titlename{ font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:bold; color:#1e4883;}.tex-ar{font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; line-height:20px;}.email a{color:#9bbc54; text-decoration:underline;}.email a:hover{color:#9bbc54; text-decoration: none;}</style></head><body>";
strBodymsg += "<div>" + txtBooking.Text + "</br>";
strBodymsg += "<table width=573 height=479 border=0 cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>";
strBodymsg += "<tr><td height=49><img src=images/email-index_01.jpg width=43 height=49></td>";
strBodymsg += "<td height=49 background=images/top-bg.jpg> </td>";
strBodymsg += "<td><img src=images/email-index_03.jpg width=41 height=49></td></tr>";
strBodymsg += "<tr><td background=images/left-bg.jpg> </td><td width=559 height=806 valign=top>";
strBodymsg += "<div align=left><a href=http://www.clickandbookonline.com><img src=images/email-temp-logo.jpg width=335 height=64 border=0></a></div>";
strBodymsg += "<div class="find">Find the details of your booking made through Clickandbookonline.com." + lblNights.Text + "Please check your booking details below</div><br>";
strBodymsg += "<div class="bookno"> Your Booking Confirmation no is: CB" + bookId + "</div><br>";
strBodymsg += "<div class="titlename"> Details of Your Room Booking:</div><br>";
strBodymsg += "<div class="tex"-ar>Hotel name:" + lblHotelname.Text + " <br>";
strBodymsg += "Hotel Address:" + lblAddress.Text + "<br>";
strBodymsg += "Hotel Contact No: 044- 4218 9999<br>";
strBodymsg += "Hotel Email Id: [email protected]<br>";
strBodymsg += "Room type: " + lblRoom.Text + "<br>";
strBodymsg += "Arrival Date: " + lblSdate.Text + "<br>";
strBodymsg += "No of Nights: " + lblNights.Text + "<br>";
strBodymsg += "No of Rooms: " + lblRoom.Text + "<br>";
strBodymsg += "Booked By: " + txtSname.Text + "<br>";
strBodymsg += "Booker email: <span class="email">" + txtEmailId.Text + "</span></div><br>";
strBodymsg += "<div class="titlename">Paymant Details</div><br>";
strBodymsg += "<div class="tex"-ar>You have used the following card details to reserve your room(s) at " + lblHotelname.Text + ",<br>";
strBodymsg += "Card holder name: " + txtCHname.Text + "<br>";
strBodymsg += "Card Type: " + ddlCardtype.SelectedItem.ToString() + "<br>";
strBodymsg += "Card Number: " + txtCardNo.Text + "<br>";
strBodymsg += "Expiry Date: " + txtMM.Text + "/" + txtYY.Text + "<br>";
strBodymsg += "Start Date: " + txtStartdate.Text + "<br>";
strBodymsg += "Arrival Time: " + ddlArrivaltime.SelectedItem.ToString() + "</div><br>";
strBodymsg += "<div class="titlename">Room Cancelllation Policy :</div><br>";
strBodymsg += "<div class="find">A Credit/debit card is required to secure your reservation at your booked Hotel.<br>";
strBodymsg += "There will be no cancellation charge if a booking is cancelled before 10:00 hotel<br>";
strBodymsg += "local time 2 days before your date of arrival. if the booking is cancelled later, or in the case of a no-show, the first night will be charged. if you booked your room<br>";
strBodymsg += "without your credit/debit card details, then please forward your credit card details<br>";
strBodymsg += "to hotel email id with reference with room confirmation mail to hold your<br>";
strBodymsg += "recervation on a confirmed basis</div><br>";
strBodymsg += "<div class="tex"-ar>If you change a booking, amend or Cencel please send an email to<br>";
strBodymsg += "<span class="email"><a href=mailto:[email protected]>[email protected]</a> </span>with your booking confirmation no.<br>";
strBodymsg += "Have a happy and sae journey!!!!</div><br>";
strBodymsg += "<div class="titlename"> With Best Regards,</div><br>";
strBodymsg += "<div class="titlename"> Click & Book Team</div></td>";
strBodymsg += "<td background=images/right-bg.jpg> </td></tr>";
strBodymsg += "<tr>";
strBodymsg += "<td><img src=images/email-index_07.jpg width=43 height=46></td>";
strBodymsg += "<td width=559 background=images/bot-bg.jpg> </td>";
strBodymsg += "<td><img src=images/email-index_09.jpg width=41 height=46>";
strBodymsg += "</td>";
strBodymsg += "</tr>";
strBodymsg += "</table>";
strBodymsg += "</div>";
strBodymsg += "<br><br>With Best Regards,<br>[email protected]<br><a href=http:[email protected]</a>";
strBodymsg += "</body>";
strBodymsg += ("</html>");
msg.IsBodyHtml = true;
msg.Body = strBodymsg;
msg.BodyEncoding = System.Text.Encoding.UTF8;
c.Host = "69.65.55.176";
c.Port = 25;
c.UseDefaultCredentials = true;
c.Credentials = new System.Net.NetworkCredential("[email protected]", "e4k2t9ey");
c.Send(msg);
ClientScript.RegisterStartupScript(this.GetType(), "aa", "<script>alert('Ur Booking is Successfully !');</script>");

It will work properly.



 Author : chandru M Member Level : BronzeDate : 10/08/2011 11:46:29 AM Points : 1

hi,

 am use this code mail aslo send. but my problem in dont display in designs..



 Author : Manoranjan Sahoo Member Level : BronzeDate : 10/08/2011 04:57:05 PM Points : 2

hi,

please check the above code. i changed some html formats. because you did not follow html formats. but i changed those. i think it will work. please check once again.

and also check in your domain whether that supports html format or only text format.

please let me know whether your problem solved or not.

Thank You.



 Author : chandru M Member Level : BronzeDate : 10/08/2011 07:15:04 PM Points : 1

hi,

 am fully check only send text msg. html design and images not send



 Author : chandru M Member Level : BronzeDate : 10/08/2011 08:05:35 PM Points : 1

hi,

 am using this way but dont display in images only display text. u know another u tell me.

 

Thanks



 Author : Manoranjan Sahoo Member Level : BronzeDate : 11/08/2011 03:40:14 AM Points : 4

Hi,

i checked your code, you did not put all image with full path and i changed some coding in the above code. check below updated code :

MailMessage msg = new MailMessage();
SmtpClient c = new SmtpClient();
int bookId;
bookId = BookerEmailid(BookerName);
msg.From = new MailAddress("[email protected]");
msg.To.Add(new MailAddress(ToID));
msg.Subject = "Welcome to the Clickandbookonline.com your Booking Confirmation Details";
strBodymsg += "<html><head><style type=\"text/css\">body{margin:0px; background-color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:11px;}.find{font-family:Arial, Helvetica, sans-serif; font-size:12px;}.bookno{ font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;}.titlename{ font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:bold; color:#1e4883;}.tex-ar{font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; line-height:20px;}.email a{color:#9bbc54; text-decoration:underline;}.email a:hover{color:#9bbc54; text-decoration: none;}</style></head><body>";
strBodymsg += "<div>" + txtBooking.Text + "</br>";
strBodymsg += "<table width=573 height=479 border=0 cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>";
strBodymsg += "<tr><td height=49><img src='http://www.clickandbookonline.com/images/email-index_01.jpg' width=43 height=49></td>";
strBodymsg += "<td height=49 background='http://www.clickandbookonline.com/images/top-bg.jpg'> </td>";
strBodymsg += "<td><img src='http://www.clickandbookonline.com/images/email-index_03.jpg' width=41 height=49></td></tr>";
strBodymsg += "<tr><td background='http://www.clickandbookonline.com/images/left-bg.jpg'> </td><td width=559 height=806 valign=top>";
strBodymsg += "<div align=left><a href='http://www.clickandbookonline.com'><img src='http://www.clickandbookonline.com/images/email-temp-logo.jpg' width=335 height=64 border=0></a></div>";
strBodymsg += "<div class="find">Find the details of your booking made through Clickandbookonline.com." + lblNights.Text + "Please check your booking details below</div><br>";
strBodymsg += "<div class="bookno"> Your Booking Confirmation no is: CB" + bookId + "</div><br>";
strBodymsg += "<div class="titlename"> Details of Your Room Booking:</div><br>";
strBodymsg += "<div class="tex"-ar>Hotel name:" + lblHotelname.Text + " <br>";
strBodymsg += "Hotel Address:" + lblAddress.Text + "<br>";
strBodymsg += "Hotel Contact No: 044- 4218 9999<br>";
strBodymsg += "Hotel Email Id: [email protected]<br>";
strBodymsg += "Room type: " + lblRoom.Text + "<br>";
strBodymsg += "Arrival Date: " + lblSdate.Text + "<br>";
strBodymsg += "No of Nights: " + lblNights.Text + "<br>";
strBodymsg += "No of Rooms: " + lblRoom.Text + "<br>";
strBodymsg += "Booked By: " + txtSname.Text + "<br>";
strBodymsg += "Booker email: <span class="email">" + txtEmailId.Text + "</span></div><br>";
strBodymsg += "<div class="titlename">Paymant Details</div><br>";
strBodymsg += "<div class="tex"-ar>You have used the following card details to reserve your room(s) at " + lblHotelname.Text + ",<br>";
strBodymsg += "Card holder name: " + txtCHname.Text + "<br>";
strBodymsg += "Card Type: " + ddlCardtype.SelectedItem.ToString() + "<br>";
strBodymsg += "Card Number: " + txtCardNo.Text + "<br>";
strBodymsg += "Expiry Date: " + txtMM.Text + "/" + txtYY.Text + "<br>";
strBodymsg += "Start Date: " + txtStartdate.Text + "<br>";
strBodymsg += "Arrival Time: " + ddlArrivaltime.SelectedItem.ToString() + "</div><br>";
strBodymsg += "<div class="titlename">Room Cancelllation Policy :</div><br>";
strBodymsg += "<div class="find">A Credit/debit card is required to secure your reservation at your booked Hotel.<br>";
strBodymsg += "There will be no cancellation charge if a booking is cancelled before 10:00 hotel<br>";
strBodymsg += "local time 2 days before your date of arrival. if the booking is cancelled later, or in the case of a no-show, the first night will be charged. if you booked your room<br>";
strBodymsg += "without your credit/debit card details, then please forward your credit card details<br>";
strBodymsg += "to hotel email id with reference with room confirmation mail to hold your<br>";
strBodymsg += "recervation on a confirmed basis</div><br>";
strBodymsg += "<div class="tex"-ar>If you change a booking, amend or Cencel please send an email to<br>";
strBodymsg += "<span class="email"><a href='mailto:[email protected]'>[email protected]</a> </span>with your booking confirmation no.<br>";
strBodymsg += "Have a happy and sae journey!!!!</div><br>";
strBodymsg += "<div class="titlename"> With Best Regards,</div><br>";
strBodymsg += "<div class="titlename"> Click & Book Team</div></td>";
strBodymsg += "<td background='http://www.clickandbookonline.com/images/right-bg.jpg'> </td></tr>";
strBodymsg += "<tr>";
strBodymsg += "<td><img src='http://www.clickandbookonline.com/images/email-index_07.jpg' width=43 height=46></td>";
strBodymsg += "<td width=559 background='http://www.clickandbookonline.com/images/bot-bg.jpg'> </td>";
strBodymsg += "<td><img src='http://www.clickandbookonline.com/images/email-index_09.jpg' width=41 height=46>";
strBodymsg += "</td>";
strBodymsg += "</tr>";
strBodymsg += "</table>";
strBodymsg += "</div>";
strBodymsg += "<br><br>With Best Regards,<br>[email protected]<br><a href='http:[email protected]'>http://www.clickandbookonline.com</a>";
strBodymsg += "</body>";
strBodymsg += ("</html>");
msg.IsBodyHtml = true;
msg.Body = strBodymsg;
msg.BodyEncoding = System.Text.Encoding.UTF8;
c.Host = "69.65.55.176";
c.Port = 25;
c.UseDefaultCredentials = true;
c.Credentials = new System.Net.NetworkCredential("[email protected]", "e4k2t9ey");
c.Send(msg);
ClientScript.RegisterStartupScript(this.GetType(), "aa", "<script>alert('Ur Booking is Successfully !');</script>");

 

 



 Author : chandru M Member Level : BronzeDate : 11/08/2011 03:35:49 PM Points : 1

hi,

this coding error in this line

strBodymsg += "<div class="find">Find the details of your booking made through Clickandbookonline.com." + lblNights.Text + "Please check your booking details below</div><br>";
strBodymsg += "<div class="bookno"> Your Booking Confirmation no is: CB" + bookId + "</div><br>";
strBodymsg += "<div class="titlename"> Details of Your Room Booking:</div><br>";
strBodymsg += "<div class="tex"-ar>Hotel name:" + lblHotelname.Text + " <br>";
strBodymsg += "<div class="tex"-ar>If you change a booking, amend or Cencel please send an email to<br>";
strBodymsg += "<span class="email"><a href='mailto:[email protected]'>[email protected]</a> </span>with your booking confirmation no.<br>";

error display in ; expected. how it solve


 Author : Manoranjan Sahoo Member Level : BronzeDate : 12/08/2011 08:38:00 AM Points : 3

hi,

replace above code with the below code :

strBodymsg += "<div class=\"find\">Find the details of your booking made through Clickandbookonline.com." + lblNights.Text + "Please check your booking details below</div><br>";
strBodymsg += "<div class=\"bookno\"> Your Booking Confirmation no is: CB" + bookId + "</div><br>";
strBodymsg += "<div class=\"titlename\"> Details of Your Room Booking:</div><br>";
strBodymsg += "<div class=\"tex-ar\">Hotel name:" + lblHotelname.Text + " <br>";



 Author : Manoranjan Sahoo Member Level : BronzeDate : 12/08/2011 08:41:37 AM Points : 4

hi,

please don't use only above code. because in your code there are many things need to change. i changed everything. just use below code :

MailMessage msg = new MailMessage();
SmtpClient c = new SmtpClient();
int bookId;
bookId = BookerEmailid(BookerName);
msg.From = new MailAddress("[email protected]");
msg.To.Add(new MailAddress(ToID));
msg.Subject = "Welcome to the Clickandbookonline.com your Booking Confirmation Details";
strBodymsg += "<html><head><style type=\"text/css\">body{margin:0px; background-color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:11px;}.find{font-family:Arial, Helvetica, sans-serif; font-size:12px;}.bookno{ font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;}.titlename{ font-family:Arial, Helvetica, sans-serif; font-size:15px; font-weight:bold; color:#1e4883;}.tex-ar{font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; line-height:20px;}.email a{color:#9bbc54; text-decoration:underline;}.email a:hover{color:#9bbc54; text-decoration: none;}</style></head><body>";
strBodymsg += "<div>" + txtBooking.Text + "</br>";
strBodymsg += "<table width=573 height=479 border=0 cellpadding=0 cellspacing=0 bgcolor=#FFFFFF>";
strBodymsg += "<tr><td height=49><img src='http://www.clickandbookonline.com/images/email-index_01.jpg' width=43 height=49></td>";
strBodymsg += "<td height=49 background='http://www.clickandbookonline.com/images/top-bg.jpg'> </td>";
strBodymsg += "<td><img src='http://www.clickandbookonline.com/images/email-index_03.jpg' width=41 height=49></td></tr>";
strBodymsg += "<tr><td background='http://www.clickandbookonline.com/images/left-bg.jpg'> </td><td width=559 height=806 valign=top>";
strBodymsg += "<div align=left><a href='http://www.clickandbookonline.com'><img src='http://www.clickandbookonline.com/images/email-temp-logo.jpg' width=335 height=64 border=0></a></div>";
strBodymsg += "<div class=\"find\">Find the details of your booking made through Clickandbookonline.com." + lblNights.Text + "Please check your booking details below</div><br>";
strBodymsg += "<div class=\"bookno\"> Your Booking Confirmation no is: CB" + bookId + "</div><br>";
strBodymsg += "<div class=\"titlename\"> Details of Your Room Booking:</div><br>";
strBodymsg += "<div class=\"tex-ar\">Hotel name:" + lblHotelname.Text + " <br>";
strBodymsg += "Hotel Address:" + lblAddress.Text + "<br>";
strBodymsg += "Hotel Contact No: 044- 4218 9999<br>";
strBodymsg += "Hotel Email Id: [email protected]<br>";
strBodymsg += "Room type: " + lblRoom.Text + "<br>";
strBodymsg += "Arrival Date: " + lblSdate.Text + "<br>";
strBodymsg += "No of Nights: " + lblNights.Text + "<br>";
strBodymsg += "No of Rooms: " + lblRoom.Text + "<br>";
strBodymsg += "Booked By: " + txtSname.Text + "<br>";
strBodymsg += "Booker email: <span class=\"email\">" + txtEmailId.Text + "</span></div><br>";
strBodymsg += "<div class=\"titlename\">Paymant Details</div><br>";
strBodymsg += "<div class=\"tex-ar\">You have used the following card details to reserve your room(s) at " + lblHotelname.Text + ",<br>";
strBodymsg += "Card holder name: " + txtCHname.Text + "<br>";
strBodymsg += "Card Type: " + ddlCardtype.SelectedItem.ToString() + "<br>";
strBodymsg += "Card Number: " + txtCardNo.Text + "<br>";
strBodymsg += "Expiry Date: " + txtMM.Text + "/" + txtYY.Text + "<br>";
strBodymsg += "Start Date: " + txtStartdate.Text + "<br>";
strBodymsg += "Arrival Time: " + ddlArrivaltime.SelectedItem.ToString() + "</div><br>";
strBodymsg += "<div class=\"titlename\">Room Cancelllation Policy :</div><br>";
strBodymsg += "<div class=\"find\">A Credit/debit card is required to secure your reservation at your booked Hotel.<br>";
strBodymsg += "There will be no cancellation charge if a booking is cancelled before 10:00 hotel<br>";
strBodymsg += "local time 2 days before your date of arrival. if the booking is cancelled later, or in the case of a no-show, the first night will be charged. if you booked your room<br>";
strBodymsg += "without your credit/debit card details, then please forward your credit card details<br>";
strBodymsg += "to hotel email id with reference with room confirmation mail to hold your<br>";
strBodymsg += "recervation on a confirmed basis</div><br>";
strBodymsg += "<div class=\"tex-ar\">If you change a booking, amend or Cencel please send an email to<br>";
strBodymsg += "<span class=\"email\"><a href='mailto:[email protected]'>[email protected]</a> </span>with your booking confirmation no.<br>";
strBodymsg += "Have a happy and sae journey!!!!</div><br>";
strBodymsg += "<div class=\"titlename\"> With Best Regards,</div><br>";
strBodymsg += "<div class=\"titlename\"> Click & Book Team</div></td>";
strBodymsg += "<td background='http://www.clickandbookonline.com/images/right-bg.jpg'> </td></tr>";
strBodymsg += "<tr>";
strBodymsg += "<td><img src='http://www.clickandbookonline.com/images/email-index_07.jpg' width=43 height=46></td>";
strBodymsg += "<td width=559 background='http://www.clickandbookonline.com/images/bot-bg.jpg'> </td>";
strBodymsg += "<td><img src='http://www.clickandbookonline.com/images/email-index_09.jpg' width=41 height=46>";
strBodymsg += "</td>";
strBodymsg += "</tr>";
strBodymsg += "</table>";
strBodymsg += "</div>";
strBodymsg += "<br><br>With Best Regards,<br>[email protected]<br><a href='http:[email protected]'>http://www.clickandbookonline.com</a>";
strBodymsg += "</body>";
strBodymsg += ("</html>");
msg.IsBodyHtml = true;
msg.Body = strBodymsg;
msg.BodyEncoding = System.Text.Encoding.UTF8;
c.Host = "69.65.55.176";
c.Port = 25;
c.UseDefaultCredentials = true;
c.Credentials = new System.Net.NetworkCredential("[email protected]", "e4k2t9ey");
c.Send(msg);
ClientScript.RegisterStartupScript(this.GetType(), "aa", "<script>alert('Ur Booking is Successfully !');</script>");



 Author : chandru M Member Level : BronzeDate : 12/08/2011 11:27:01 AM Points : 1

hi,

      this code not supported in image. only send text message. no view in background images and inside logo images..



 Author : Manoranjan Sahoo Member Level : BronzeDate : 12/08/2011 03:08:26 PM Points : 1

can you please give me exact image adress which one i can access from here. so that i can make one exact script for you.

Thank You.



 Author : chandru M Member Level : BronzeDate : 12/08/2011 03:14:22 PM Points : 1

hi,

<img src=images/email-temp-logo.jpg' width=335 height=64 border=0>

Thank you



 Author : Manoranjan Sahoo Member Level : BronzeDate : 13/08/2011 06:59:53 AM Points : 1

please give me full path of those images.

for example : 

http://dotnetsquare.com/images/a.jpg



Post Reply
Login to post Response.