I have a web form of 10 questions that is behind logon membership, form results on submit gives postback html confirmation page with results of web form. I would liketo send email in plain textof form results to logon member automatically and populate a database. Does this involve the system.Net.Mail NAMESPACE in ASP.NET2?? Does DASP havespecial smtp mail server service for this? Is there a video -or- DASP KB -or- asp.net lessonon these email/database techniques using VWD2005?? I have DASP sql2005 server acct. thanks for your guidance
Hi, From your code pages, ASP.NET 2 or above will use System.Net.Mail for this to send mail. Not required however to store the records in the DB. You can see a lot of tips here: http://www.systemnetmail.com/ And plenty of "working with data"videos here: http://www.asp.net/learn/ Salute, Mark Technical Evangelist for DiscountASP.NET http://www.iis7test.com/webcasts/ http://weblogs.asp.net/markwisecarver/ http://blogs.windowsclient.net/wisecarver/default.aspx (Microsoft IT Usability http://msitusability.multiply.com/)
WoW... I didn't know working with ASP.NET email was so confusing and hard some suggest System.Net.Mail, some suggest System.Web.Mail?? Ok...what does DASP SMTP serverssuggest? I don't really see too much material on how to simplify working with email. And I don't seem to get much help from ASP.net siteinstruction. Would anyone know of a nice instructional video? So far I found this link seems OK on sending email in asp.net: http://forums.asp.net/t/971802.aspx
Thanks Chuck...for the tip. Just wanted to get this straight. So the mail class DASP KB suggestion is just to send generic email??? I does notpick up results from a web form to send email results of formto the recipient. I don't know if I should use theemail with attachmentsmethod -or- create an attachment from a streammethod?
ASP.NET's , mail class is actually rather simple. Take a look at an example here: http://kb.discountasp.net/article.aspx?id=10443 In regards to System.Net.Mail and System.Web.Mail: System.Web.Mail is being deprecated. It has something to do with being tied to the WIN2k's SMTP service as default or something - I don't totally recall. The point is System.Net.Mail is the new and current one. You should use this.
Our KB is just a generic 'This is a simple example of how to send mail' article. In regards to the system.net.mail class - it only sends mail. You are going to have to include the fields you are using in the page and using to write in the database to populate the email message body. Probably best to send after you wrote to the database. mail.Subject = 'You answered ' + answerOne + ' ' + answerTwo; Im sure you know what I mean... When sending mail from a webapplication use 'localhost'. No need to authenticate. As your application is hosted on our servers there is no need to authenticate. You authenticated when you uploaded it! /emoticons/smile.gif I know some videos are being worked on Im not sure about this exact topic though - but its a good suggestion. Ill pass the idea along.