Peter Michaux
2006-Apr-01 19:44 UTC
[Rails] problems getting ActionMailer working (on server)
Hi, I''ve read the Agile Rails book''s chapter on ActionMailer a few times. Seems pretty straight forward. Unfortunately I can''t get my application to actually send mail. I uploaded my application to the web server and tried to get a mail message sent. Nothing happened. I looked in the log file and it says Sent mail: From: service@freedomkilts.com To: petermichaux@gmail.com Bcc: petermichaux@gmail.com Subject: Freedom Kilts Order Confirmation Content-Type: text/plain; charset=utf-8 and I don''t see any errors. Does this mean that the rails app was happy and able to connect to the mail server? In my configuration.rb file I have (where password is actually visible and correct). I am able to log into the webmail with this username and password so I think that part is ok. I also tried without the "mail." part in :domain. ActionMailer::Base.delivery_method = :stmp ActionMailer::Base.server_settings = { :address => "mail.freedomkilts.com", :port => 25, :domain => "mail.freedomkilts.com", :authentication => :login, :user_name => "service@freedomkilts.com", :password => "********" } ActionMailer::Base.default_charset = "utf-8" When I use the create_order() method and look at the generated email everything looks ok. I have switched this to deliver_order(). Any ideas? Getting ActionMailer working has been a much too long project for me. Thanks, Peter
Peter Michaux
2006-Apr-01 19:51 UTC
[Rails] Re: problems getting ActionMailer working (on server)
In case it matters, I don''t know how to restart my rails app on the monsterhosting.ca webserver since I never had to start it in the first place. It just seems to run. So I don''t even know if my environment changes are taking affect when I make them. Thanks, Peter On 4/1/06, Peter Michaux <petermichaux@gmail.com> wrote:> Hi, > > I''ve read the Agile Rails book''s chapter on ActionMailer a few times. > Seems pretty straight forward. Unfortunately I can''t get my > application to actually send mail. > > I uploaded my application to the web server and tried to get a mail > message sent. Nothing happened. I looked in the log file and it says > > Sent mail: > From: service@freedomkilts.com > To: petermichaux@gmail.com > Bcc: petermichaux@gmail.com > Subject: Freedom Kilts Order Confirmation > Content-Type: text/plain; charset=utf-8 > > and I don''t see any errors. Does this mean that the rails app was > happy and able to connect to the mail server? > > In my configuration.rb file I have (where password is actually visible > and correct). I am able to log into the webmail with this username and > password so I think that part is ok. I also tried without the "mail." > part in :domain. > > ActionMailer::Base.delivery_method = :stmp > > ActionMailer::Base.server_settings = { > :address => "mail.freedomkilts.com", > :port => 25, > :domain => "mail.freedomkilts.com", > :authentication => :login, > :user_name => "service@freedomkilts.com", > :password => "********" > } > > ActionMailer::Base.default_charset = "utf-8" > > When I use the create_order() method and look at the generated email > everything looks ok. I have switched this to deliver_order(). > > Any ideas? Getting ActionMailer working has been a much too long project for me. > > Thanks, > Peter >
Peter Michaux
2006-Apr-02 03:31 UTC
[Rails] Re: problems getting ActionMailer working (on server)
Anyone have any ideas? I''ve been struggling with this email problem for hours. Thanks, Peter On 4/1/06, Peter Michaux <petermichaux@gmail.com> wrote:> In case it matters, I don''t know how to restart my rails app on the > monsterhosting.ca webserver since I never had to start it in the first > place. It just seems to run. So I don''t even know if my environment > changes are taking affect when I make them. > > Thanks, > Peter > > > On 4/1/06, Peter Michaux <petermichaux@gmail.com> wrote: > > Hi, > > > > I''ve read the Agile Rails book''s chapter on ActionMailer a few times. > > Seems pretty straight forward. Unfortunately I can''t get my > > application to actually send mail. > > > > I uploaded my application to the web server and tried to get a mail > > message sent. Nothing happened. I looked in the log file and it says > > > > Sent mail: > > From: service@freedomkilts.com > > To: petermichaux@gmail.com > > Bcc: petermichaux@gmail.com > > Subject: Freedom Kilts Order Confirmation > > Content-Type: text/plain; charset=utf-8 > > > > and I don''t see any errors. Does this mean that the rails app was > > happy and able to connect to the mail server? > > > > In my configuration.rb file I have (where password is actually visible > > and correct). I am able to log into the webmail with this username and > > password so I think that part is ok. I also tried without the "mail." > > part in :domain. > > > > ActionMailer::Base.delivery_method = :stmp > > > > ActionMailer::Base.server_settings = { > > :address => "mail.freedomkilts.com", > > :port => 25, > > :domain => "mail.freedomkilts.com", > > :authentication => :login, > > :user_name => "service@freedomkilts.com", > > :password => "********" > > } > > > > ActionMailer::Base.default_charset = "utf-8" > > > > When I use the create_order() method and look at the generated email > > everything looks ok. I have switched this to deliver_order(). > > > > Any ideas? Getting ActionMailer working has been a much too long project for me. > > > > Thanks, > > Peter > > >
Ray Baxter
2006-Apr-02 04:11 UTC
[Rails] Re: problems getting ActionMailer working (on server)
Peter Michaux wrote:> Anyone have any ideas? I''ve been struggling with this email problem for hours.There are so many mail configurations that this is hard problem to solve with the provided information. It''s also pretty hard to solve this type of problem without shell access, and that you don''t even know if your config changes are being entered makes it a bear. 1) Try to figure out how to make config changes take effect. See if you can access the server logs. Double check the docs your host provides. If you don''t know if the changes are applied, you are wasting your time. If your host is not helpful, just upload a broken config file and see if that breaks your app. Be ready to roll it back. Once that is clear, 2) Are you sure the delivery method is smtp? 3) Since you are sending mail from the host, you aren''t using authentication, comment out that line, and the password. 4) The user_name that you configure will be the sender of the mail. Depending on how things are configured, and where the error is, the mail might be returned to that address. Is that address a mail box where you can read the mail. 5) Are you sure you don''t have access to the server logs? What about the mail logs? -- Ray
Peter Michaux
2006-Apr-02 04:22 UTC
[Rails] Re: problems getting ActionMailer working (on server)
Hi Ray, Thank you for the information. I am amazed this is such a difficult problem. In PHP all I need to do is something little like mail($content, $to, $from) I''ll keep trying. Thanks, Peter On 4/1/06, Ray Baxter <ray@warmroom.com> wrote:> Peter Michaux wrote: > > > Anyone have any ideas? I''ve been struggling with this email problem for hours. > > There are so many mail configurations that this is hard problem to solve > with the provided information. It''s also pretty hard to solve this type > of problem without shell access, and that you don''t even know if your > config changes are being entered makes it a bear. > > 1) Try to figure out how to make config changes take effect. See if you > can access the server logs. Double check the docs your host provides. If > you don''t know if the changes are applied, you are wasting your time. If > your host is not helpful, just upload a broken config file and see if > that breaks your app. Be ready to roll it back. > > Once that is clear, > > 2) Are you sure the delivery method is smtp? > > 3) Since you are sending mail from the host, you aren''t using > authentication, comment out that line, and the password. > > 4) The user_name that you configure will be the sender of the mail. > Depending on how things are configured, and where the error is, the mail > might be returned to that address. Is that address a mail box where you > can read the mail. > > 5) Are you sure you don''t have access to the server logs? What about the > mail logs? > > -- > > Ray > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >