asp.net mvc - Attach files using <a href="mailto:? -
I have the following code snippet: This mail opens the approach with the subject, but failed to attach the file. Actually I am trying to attach two files in MVC4 view, so MailAttachment [0]
& lt; A href = "melto:? Topic = @ (model. Malpot) and attachment = @ (model. Mail attachment [0])" & gt; & Lt; Img src = "~ / images / mail" /> & lt; / A & gt; I do not have to call any action message, so that the approach is trying to open itself.
You can not add mail-broken to client side files with server-side code (razor code) , Unless you give the correct path to the client side file.
First you need to download the file to the client side of the user. Then ask that file to attach in the email.
In addition to the Melato scheme.
As an alternative, you can send email from server itself.
Comments
Post a Comment