I want to send an email to the user, where he can click the link to go to my site. I do not want to hardcode the URL in my email templates. I want this dynamic to be in a way, that regardless of the environment, it will send the linked URL. For example, if I am in a development environment, it sends something like http://localhost:port or during the production process it sends the actual URL of the website. http://www.domain.com
I just need to know how to save it in a DynamicViewBag in MVC action. Any suggestion plz?
source share