Sep 13, 2005 #1 ace333 Programmer Joined Jul 12, 2005 Messages 105 Location CH 1. I'm querying a database that brings back rows of data 2. I wrap the data in html so it has a table structure Q. What I want to do is send the table in the body of an email .... I'm gona google it but any suggestions before that would be great
1. I'm querying a database that brings back rows of data 2. I wrap the data in html so it has a table structure Q. What I want to do is send the table in the body of an email .... I'm gona google it but any suggestions before that would be great
Sep 13, 2005 #2 stsuing Programmer Joined Aug 22, 2001 Messages 596 Location US Set the BodyFormat = System.Web.Mail.MailFormat.Html Upvote 0 Downvote
Sep 13, 2005 Thread starter #3 ace333 Programmer Joined Jul 12, 2005 Messages 105 Location CH cheers, i found some code that uses the name space using System.Web.Mail; where can i find this dll if its not on my pc Upvote 0 Downvote
cheers, i found some code that uses the name space using System.Web.Mail; where can i find this dll if its not on my pc
Sep 13, 2005 #4 stsuing Programmer Joined Aug 22, 2001 Messages 596 Location US You should be able to make a direct reference to it under .Net Upvote 0 Downvote
Sep 13, 2005 Thread starter #5 ace333 Programmer Joined Jul 12, 2005 Messages 105 Location CH using System.Web.Mail; is at the top but i need to be able to find the dll to add it to the project,, can u elaborate on what u mean cheers Upvote 0 Downvote
using System.Web.Mail; is at the top but i need to be able to find the dll to add it to the project,, can u elaborate on what u mean cheers
Sep 13, 2005 #6 stsuing Programmer Joined Aug 22, 2001 Messages 596 Location US http://www.deitel.com/books/NET/AddingReferences.pdf Upvote 0 Downvote
Sep 13, 2005 Thread starter #7 ace333 Programmer Joined Jul 12, 2005 Messages 105 Location CH This is my email code, how do i adjust to html format MailMessage mail = new MailMessage(); mail.To = "xxxxxx";//txtTo.Text; mail.From = "xxxxxxx";//txtFrom.Text; mail.Subject = "test"; //txtSubject.Text; //mail.BodyFormat. //Set the BodyFormat = System.Web.Mail.MailFormat.Html mail.Body =table; //txtBody.Text; SmtpMail.SmtpServer = "localhost"; SmtpMail.Send(mail); Upvote 0 Downvote
This is my email code, how do i adjust to html format MailMessage mail = new MailMessage(); mail.To = "xxxxxx";//txtTo.Text; mail.From = "xxxxxxx";//txtFrom.Text; mail.Subject = "test"; //txtSubject.Text; //mail.BodyFormat. //Set the BodyFormat = System.Web.Mail.MailFormat.Html mail.Body =table; //txtBody.Text; SmtpMail.SmtpServer = "localhost"; SmtpMail.Send(mail);
Sep 13, 2005 #8 stsuing Programmer Joined Aug 22, 2001 Messages 596 Location US mail.BodyFormat = MailFormat.Html Upvote 0 Downvote
Sep 13, 2005 Thread starter #9 ace333 Programmer Joined Jul 12, 2005 Messages 105 Location CH do i need to set up an smtp server on iis to send the emails, do u know how to do this Upvote 0 Downvote