1 Replies - 1892 Views - Last Post: 16 April 2007 - 04:11 AM Rate Topic: -----

#1 marketinggenieus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 11-April 07

Need to Export data form table to dIrect in to mail

Posted 12 April 2007 - 12:12 AM

hi ,

i am asp.net learner. i got the project .so in that project contact us page is there i put the text box for Email Id and address ....etc. now i want while click on the submit the mail address and data will be directly mail to admin of the site ....pls help me for this problem .......send me code in vb or C# .net


:rolleyes: :rolleye :^: :^: :^: :^: :^: :^: :^: s:

Is This A Good Question/Topic? 0
  • +

Replies To: Need to Export data form table to dIrect in to mail

#2 dkirkland  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 13-April 07

Re: Need to Export data form table to dIrect in to mail

Posted 16 April 2007 - 04:11 AM

In terms of actually sending an email using .NET, check out this article.

I have attached a slightly modified version of the SmptDirect class, which was modified to allow sending of HTML mail.

Attached File  SmtpDirect.zip (1.85K)
Number of downloads: 162

Usage of the class is as follows:
SmtpDirect.SmtpServer = "yourMailServer";
MailMessage mail = new MailMessage();
mail.BodyFormat = MailFormat.Html;
mail.From = "example@somedomain.com";
mail.To = "person@somedomain.com";
mail.Subject = "someSubject";
mail.Body = "yourEmailBody";
SmtpDirect.Send(mail);


In this example the email body consists of HTML, which can contain all the usual HTML formatting so you can make the email nice and pretty ;)

Hope this helps,
David.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1