Hi Pooja jaishankar,
You can check the below link, this is similar to ur issue.
https://forum.mendix.com/link/questions/105571
Might be a access rights issue. Make sure that the user that is sending the email allowed to read the created attachment.