I am putting this in my mailer view........which sends message to some id. suppose xyz-+zpghU0kKgY@public.gmane.org ------------------------------------------------------------------------ Hi! You are having one email message from <%= @email %> with a title <%= @title %> and following is the message: <a href = "www.localhost:3004/Email" > Confirm </a> Thanks --------------------------------------------------------------------- On checking it on rediffmail or gmail server, I am getting same thing Hi! You are having one email message from <%= @email %> with a title <%= @title %> and following is the message: <a href = "www.localhost:3004/Email" > Confirm </a> Thanks Not getting link to Confirm....... Don''t know why? -- Posted via http://www.ruby-forum.com/.
Do you get links on other than gmail or rediff? Do you have action mailer instance under model folder? Have defined methods within it? Here is a brief; ruby script/generate mailer Notify This should generate the following in your model directory and under folder in your view. class Notify < ActionMailer::Base end now, you define methods with in models/notify.rb class Notify < ActionMailer::Base def notifycustomer(blahh, blah) @subject = "Message from a visitor" @recipients = blahh.email @from = blah[:email] @sent_on = Time.now @body["title"] = blah[:msg] end end in your controllers action you would trigger it def sendmail2customer Notify.deliver_notifycustomer(@blahh, params[:blah]) end in your view, you will have sendmail2customer.html.erb which might have Hi! You are having one email message from <%= @email %> with a title <%= @title %> and following is the message: <a href = "www.localhost:3004/Email" > Confirm </a> Thanks let me know how it goes -- Posted via http://www.ruby-forum.com/.
Rails List wrote:> Do you get links on other than gmail or rediff? > > Do you have action mailer instance under model folder? Have defined > methods within it? > > Here is a brief; > > ruby script/generate mailer Notify > > This should generate the following in your model directory and under > folder in your view. > > class Notify < ActionMailer::Base > end > > now, you define methods with in models/notify.rb > > class Notify < ActionMailer::Base > > def notifycustomer(blahh, blah) > @subject = "Message from a visitor" > @recipients = blahh.email > @from = blah[:email] > @sent_on = Time.now > @body["title"] = blah[:msg] > end > end > > in your controllers action you would trigger it > > def sendmail2customer > Notify.deliver_notifycustomer(@blahh, params[:blah]) > end > > in your view, you will have sendmail2customer.html.erb which might have============================================================================== Hi! You are having one email message from <%= @email %> with a title <%= @title %> and following is the message: <a href = "www.localhost:3004/Email" > Confirm </a> Thanks ============================================================================I am getting this Hi! You are having one email message from hunt-QOiod4cnrWAN+BqQ9rBEUg@public.gmane.org with a title Confirmation and following is the message: <a href = "www.localhost:3004/Email" > Confirm </a> Thanks -- Posted via http://www.ruby-forum.com/.
you have to replace the variables with your own def notifycustomer(blahh, blah) @subject = "Message from a visitor" @recipients = blahh.email @from = blah[:email] @sent_on = Time.now @body["title"] = blah[:title] #now you can use @title in your view @body["msg"] = blah[:msg] # now you can use @msg in your view @body["url"] = "some url" # now you can use @url in your view end if you have followed my sample code then your view should have Hi! You are having one email message from <%= @email %> with a title <%= @title %> and following is the message: <%= @msg %> url: <%= @url %> Thanks -- Posted via http://www.ruby-forum.com/.