I have a requirement where a user can request some data as an email attachment from one of our visualforce pages.
I am fetching the data over a REST web service call from an external system. Using that data an Excel document is created and sent as an attachment in an email to the user. However, to fetch the data in certain scenarios, due to the huge data load, we are getting stuck with the 120 second timeout.
Is there a way I can use @future or any other workaround to overcome this issue?