David

Thanks for the quick reply!  I've submitted a support ticket and
answered your questions there.  Here's a link.

http://support.heroku.com/requests/2977

Thanks again!
Lance

On Dec 8, 11:48 am, David Dollar <[email protected]> wrote:
> A couple of questions:
>
> 1) What is the name of your app?  (the bit before .heroku.com)
> 2) When you say "sending mail from" do you mean the from address?
> 3) Where are you seeing the 500 error
>
> If you'd like to take this off-list, please submit a support ticket 
> athttp://support.heroku.comso we can help you track down the problem.
>
> - David
>
>
>
> On Tue, Dec 8, 2009 at 11:39 AM, lanceball <[email protected]> wrote:
> > Hi there
>
> > I'm using the sendgrid basic addon and I'm a little stumped.  I get a
> > 500 error when sending mail from my custom domain, but not from
> > myapp.heroku.com.
>
> > My mailer is very simple - an observer that sends out email on save of
> > an AR object.  And like I said, everything works just fine when I'm
> > navigating the app using the myapp.heroku.com domain.
>
> > I've set config.action_mailer.raise_delivery_errors = true in
> > production.rb
>
> > But heroku logs show me nothing.  Here's what I see in the logs after
> > a restart of the app and then a test resulting in the 500 error.
>
> > Otherland:$ heroku logs
> > ==> production.log <==
> > # Logfile created on Tue Dec 08 08:24:18 -0800 2009
> > ==> dyno-455072.log <==
> > Otherland:$
>
> > If I use the heroku console to create the AR object mail is sent just
> > fine.  Here's what that looks like:
>
> > >> Contact.inspect
> > => "Contact(id: integer, name: string, email: string, message: text,
> > created_at: datetime, updated_at: datetime)"
> > >> Contact.create!(:name=>'foo', :email=>'[email protected]', message=>'hello
> > world')
> > NameError: undefined local variable or method `message' for #<Object:
> > 0x2b6a4f52a348 @heroku_console_output=[]>
> > >> Contact.create!(:name=>'foo', :email=>'[email protected]', :message=>'hello
> > world')
> > => #<Contact id: 6, name: "foo", email: "[email protected]", message: "hello
> > world", created_at: "2009-12-08 16:28:44", updated_at: "2009-12-08
> > 16:28:44">
>
> > My controller is pretty basic...
>
> > class ContactsController < ApplicationController
> >  def create
> >   �...@contact = Contact.create!(params[:contact])
> >    flash[:info] = 'Your message has been sent. Thanks!'
> >    redirect_to contact_path(@contact)
> >  end
> > end
>
> > My observer:
>
> > class ContactObserver < ActiveRecord::Observer
> >  def after_create(contact)
> >    ContactMailer.deliver_contact_message(contact)
> >    contact.logger.info("Contact from #{contact.name} sent")
> >  end
> > end
>
> > My mailer:
>
> > class ContactMailer < ActionMailer::Base
> >  def contact_message(contact)
> >    recipients '[email protected]'
> >    bcc '[email protected]'
> >    subject "New aliciachatham.com Message from #{contact.name}"
> >    from '[email protected]'
> >    body :contact=>contact
> >  end
> > end
>
> > This is all Rails 101 stuff, so I'm baffled as to why it's not
> > working.  Can anyone point me in the right direction?  I'm at a bit of
> > a loss at this point.
>
> > Thanks,
> > Lance
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Heroku" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<heroku%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/heroku?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.


Reply via email to