How to send out an email with attachment from Azure Function App using java language

Chen, Carson-WQ 61 Reputation points
2022-08-11T09:16:44.87+00:00

Dear sir,

I am writing an azure function app with logics:

  1. generate a csv file and upload to Azure Blob storage
  2. get the uploaded csv file from Azure Blob storage and then send out an email to some one with above csv file as attachment

Is it possible or any solutions to send out an email with attachment in function app?

Thank you in advance.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,180 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,402 questions
0 comments No comments
{count} votes

Accepted answer
  1. MughundhanRaveendran-MSFT 12,411 Reputation points
    2022-08-11T09:56:12.633+00:00

    @Chen, Carson-WQ ,

    Thanks for posting this query in Q&A.

    You can use Sendgrid mail api to send mails from Azure Java functions. Please note that, sendgrid is available in the Azure marketplace.

    Here are few examples of how to add attachment using sendgrid

    https://stackoverflow.com/questions/12840972/how-to-send-attachment-using-sendgrid-mail-api

    https://www.javacodemonk.com/sendgrid-mail-attachments-with-spring-boot-34318e77

    Hope this helps! Feel free to reach out to me if you have any questions or concerns.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful