Click here to Skip to main content
15,612,565 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I am able to send email in core web api with attachments but attachments exists locally in a folder of api application.

But i want to send attachment dynamically i.e.

What I have tried:

Sending Email in Asp.Net Core Web Api with Attachments
Updated 20-Apr-21 21:39pm
SeanChupas 20-Apr-21 14:02pm    
I do not understand your question.

1 solution

You cannot send trees through email.

But seriously, think about what you are trying to do. You can add a file as an attachment, but it must be local to the sender, as the content has to be encoded into the email body before it can be sent. For a link, the system would need to download it to a local disk (which may not even be possible) before it could be added to the message. The simple answer is to add the link to the message.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900