Hi
I have vacancies, I want to recommend, and if wanted directly attache as pdf.
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 def forward 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.' else flash[:notice] = 'The Job offer could not be sent' end redirect_to :action => :show, :id => params[:vacancy_number] end
Thanks for any clue!