I have vacancies, I want to recommend, and if wanted directly attache
You get the PDF with e.g. /vacancies/9887.pdf
How can I attach some thing in a mail?
Whats the best pratice here?
Sending through Rack?
Streaming / self calling HTTP URI and attach it?
I tried even to do something like this:
# Forward via Email
render_to_string :action => "show"
pdf = response.body
@vacancy = Vacancy.find_by_vacancy_number(params[:vacancy_number])
if NotificationMailer.recommendation(@vacancy, params[:email],
(params[:pdf] == 'true'), params).deliver
flash[:notice] = 'The Job offer has been sent.'
flash[:notice] = 'The Job offer could not be sent'
redirect_to :action => :show, :id => params[:vacancy_number]
Thanks for any clue!