-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail body showing as attachment along with generated xlsx file. #120
Comments
Is your mail template name the same as the email action name? |
Yes. |
Just for your reference.
Note that send_report is the email action name and scheduled_report_download is the axlsx ttemplate file name i'm generating. |
Try renaming the attachment template to something else. |
FYI, the template lookup mechanism appears to cache values and get confused. This is where the Rails "magic" breaks down. If the lookup process appears to match the action it will use what it has found. Renaming the attachment template has helped in other cases. If you would let us know your results. |
Sorry but no luck with the above solution.
Note the renamed template test_template above. |
@vivekapex Did you every have any success or did you move on? |
Didn't have any success with this. The file attachment is working like charm but the mail content is still showing as another attachment. |
I was having the same problem, My workaround was to simply
Can't say if it's elegant or not. |
Declaring layout: false renders the mail body as another attachment and on not declaring the same it shows Missing template layouts/mailer with {:locale=>[:en], :formats=>[:xlsx], :variants=>[], :handlers=>[:axlsx]}
Is there a way to have the correct attachment file along with the correct mail body and styling?
Thanks for any help in advance.
The text was updated successfully, but these errors were encountered: