Yes I am attempting to basically give it a URL, I'm not sure how else
to do it..

On Feb 1, 3:27 am, Frederick Cheung <frederick.che...@gmail.com>
wrote:
> On Jan 31, 4:48 pm, Ryan Abbott <abbot...@gmail.com> wrote:
>
>
>
>
>
> > I have a script that is running as a runner script, its job is to find
> > reports that have recently been published and send emails to the users
> > notifying them of the reports. The reports are available online, but
> > are also available via a generated PDF which the users can see by
> > tacking on .pdf to the end of their URL.
>
> > I want to attach the pdf to the email that the runner script sends
> > out. The problem I'm facing is that the runner script cannot 'find'
> > the pdf and I dont know why - here are my guesses:
>
> > 1. You have to authenticate to see the pdf reports (which is true, but
> > im not sure if the action mailer needs to authenticate and cannot do
> > that?)
>
> > 2. I am only able to use the path of the pdf, not the full url. The
> > pdf is available through a url obviously, but the url contains a
> > subdomain - but because this is a runner script that runs behind the
> > scenes, it has no context and therefor cannot determine the URL.
>
> Are you trying to attach the pdf by giving actionmailer the path from
> the url that generates the pdf (ie /some_controller/some_id/
> generate.pdf or similar) ? That sounds very roundabout, and just out
> of the box you need to give actionmailer a path to an actual file on
> disk. You'd be far better off invoking the actual pdf generation code
> from your script.
>
> Fred
>
> Fred
>
>
>
> > I'm not sure which one is causing the failure, anyone have any ideas?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to