I am trying to send an email to people when they do a payment through my site. I am able to generate the attachment and send it along with the emails.
I need my application flow to be like this :
Generate attachment -> Send with email -> Send the attachment to Google Drive
The first and second steps are done. I am having some issues with the third step. For Google Drive, I have made a separate module using the Google APIs and it is working nicely.
The issue I am having is with passing the pdf object to the Functions declared in Drive from my ActionMailer. Instead of passing the pdf, the function is sending this Object.
ActionMailer::Base::NullMail:0x0x0x(something)
The Mailer by default only returns ActionMailer objects, is there any way I can override it to return the PDF which I generated in my Mailer? If there is not, what are some other ways I can do it?