Saritha
Saritha

Reputation: 19

How to send email with confirmation link using MVC Mailer with Web API?

I am trying to send an email with confirmation link using MVC Mailer and Web API in C#. I am able to send the email using mvc mailer. But I am not able to get the link working using MVC Mailer. Appreciate your help on this.

The SendValdationEmail() function is being called from public HttpResponseMessage Post(Registration registration) inside RegisterController which inherits from API Controller.

The email is being sent to the registered user.

When the user clicks the CONfirm link in the email then the control has to be passed to public HttpResponseMessage Put(Validation validation) inside RegisterController which inherits from API Controller.

I have tried using

<a href ="@Url.Abs(Url.Action("Put", "Register"))"> CONFIRM.</a>

But it is erroring out when i try to execute this code.

How can I accomplish this?

Upvotes: 1

Views: 1059

Answers (0)

Related Questions