Did you actually try this? I can remember trying that first... but for some reason I came up with the code above. (But could be it was something else...)
Yeah all working and email being sent...at first i (stupidly) used the actual alias name of the property...the only other stumbling block was my SMTP settings in the webconfig.
Contact Us Form issue - A from address must be specified
Hi,
The contact us form gave me the following error;
A from address must be specified.
I had to add the following line of code into the App_Code/ContactController.cs file
mailMessage.From = new MailAddress("[email protected]", "Dum Dummy");
in the SendSmptEmail method (r.85) to get it working.
A small point but if you use the following line instead
mailMessage.From = new MailAddress(senderEmail);
Then whatever you speciify in the backend for "Sender Email Address" will be the addess thats used.
Regards,
S
Did you actually try this? I can remember trying that first... but for some reason I came up with the code above. (But could be it was something else...)
Yeah all working and email being sent...at first i (stupidly) used the actual alias name of the property...the only other stumbling block was my SMTP settings in the webconfig.
Should this be marked as the answer?
Cheers,
Stephen
Just to confirm adding
mailMessage.From = new MailAddress(senderEmail);
to row 85 of App_Code/ContactController.cs worked for me.
is working on a reply...