❔ 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
Angius17mo ago
What logic do you want to implement on Blazor side?
Sandesh Dhakal
Sandesh DhakalOP17mo ago
Sending the email through the form using the Api
Angius
Angius17mo ago
Doing that on client-side is not a good idea
Sandesh Dhakal
Sandesh DhakalOP17mo ago
i am trying to use an API in the client side
Angius
Angius17mo ago
You mean your own API controller? If that's the case, just use HttpClient
Sandesh Dhakal
Sandesh DhakalOP17mo 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 DhakalOP17mo ago
this is the way I am implementing the logic. The attachment is null from the request in this case.
Sandesh Dhakal
Sandesh DhakalOP17mo ago
@angius
Accord
Accord17mo 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.
Want results from more Discord servers?
Add your server