Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending an email

Status
Not open for further replies.

ace333

Programmer
Jul 12, 2005
105
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
 
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
 
You should be able to make a direct reference to it under .Net
 
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
 
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);
 
do i need to set up an smtp server on iis to send the emails, do u know how to do this
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top