❔ Send mail using API in Blazor WebApp

I am trying to use a form to send mail vai an API from .Net core . How can I implement the logic in the blazor side. Help me with the code in the blazor page. Thanks!
9 Replies
Angius
Angius2y ago
What logic do you want to implement on Blazor side?
Sandesh Dhakal
Sandesh DhakalOP2y ago
Sending the email through the form using the Api
Angius
Angius2y ago
Doing that on client-side is not a good idea
Sandesh Dhakal
Sandesh DhakalOP2y ago
i am trying to use an API in the client side
Angius
Angius2y ago
You mean your own API controller? If that's the case, just use HttpClient
Sandesh Dhakal
Sandesh DhakalOP2y ago
I am using IFormFile for the attachment. In th blazor form while I send the attachment. It is requested as null.
Sandesh Dhakal
Sandesh DhakalOP2y ago
this is the way I am implementing the logic. The attachment is null from the request in this case.
Sandesh Dhakal
Sandesh DhakalOP2y ago
@angius
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?