开发者

MVC 2 Contact Form

How do I create a contact form that will submit to an email address? The email account will be hard coded and grabbed from a form field to cc send开发者_StackOverflow社区er.

Thanks!!


You'll need the form to submit to a controller action on the server (I'm assuming ASP .NET MVC 2 based on the question's title) which will build and send the email.

There are plenty of tutorials on how to actually send the email. Basically, you use the mail objects from System.Net to construct a message and send it to an SMTP server. Naturally, this means you'll need an SMTP server you can use. Your email provider may or may not have a public one. If not, that's a whole other question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜