I had the same problem as Adam after adapting the code described in system.web.ui.webcontrols.maildefinition
The solution is to replace "this" with "new System.Web.UI.Control ()"
For example, in the above C # Microsoft example, instead of
fileMsg = md.CreateMailMessage(sourceTo.Text, replacements, this);
In the MVC controller you should write:
fileMsg = mailDefinition.CreateMailMessage("email@address.com", replacements, new System.Web.UI.Control());
source
share