0

im a noob and i would like to have a app with a form to send emails,

this is the code I want to Modify:

var mailMessage = new MvcMailMessage { 
       Subject = "welcome" };
       mailMessage.To.Add("windchester**2@gmail.com");
       PopulateBody(mailMessage, viewName: "Welcome");
       return mailMessage;

so the Subject, body and the Mail.message.To.Add info should come from a form,

can you guide me in the right direction?

1 Answers1

0

You need to try something more. Create a form, and use either javascript or php to echo the field values to the screen.

Once you get that working, attempt to mail the stuff using either the method you have above, or find a php version of the same thing.

Forget about MVC at this point. It is more of an advanced concept.

Pete B.
  • 3,188
  • 6
  • 25
  • 38
  • Thanks for the answer, I am on a internship and they use mvc, and they asked me to do this mail seding form... the proble is I never had this programming language and I'm working by watching tutorials, and trial and error. – RafaelDQM Apr 10 '13 at 15:39
  • Your bosses probably don't understand MVC. You would be surprised how often that happens. – Pete B. Apr 11 '13 at 02:20