Modifying the email content to include an attachment
In this recipe, you will learn how to send a file as an attachment to the registered user. In our previous recipe, we created a log file of the email content. We will send the same file as an attachment to the email. However, in real-world applications, you might not intend to send log files to the end user. For the sake of simplicity, we will send the log file as an attachment.
Note
At the time of writing this, SendGrid recommends that the size of the attachment not exceed 10 MB, though technically, you can have the size of your email as 30 MB.
Getting ready
This is the continuation of the previous recipe. Go through the previous recipes of this chapter just in case you are reading this first.
How to do it...
- Make the changes to the code to create the log file with the RowKey of the table. We will be achieving this using the
IBinder
interface. - Send this file as an attachment to the email.
Customizing the log file name using IBinder interface
- Navigate...