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