search for: send_email

Displaying 18 results from an estimated 18 matches for "send_email".

2005 Dec 24
10
can''t find view from Mailer?
Hi everyone, Like so many other here, I too am new to Rails (and Ruby), and so far it''s been a great experience. I haven''t been able to get around one problem though. When trying to use the mailer, I recieve an error like this: ActionView::ActionViewError in Tell_friend#send_email No rhtml, rxml, or delegate template found for send_to_friend The scenario is this: A form on a page is submitted to a controller "tell_friend", action "send_email". In tell_friend_controller.rb''s send_email(), mail is sent like this: TellFriend.deliver_send_to_frie...
2007 Dec 29
0
should send_email always succeeds?
I wrote the following in my spec: emails = ActionMailer::Base.deliveries emails.length.should eql(2) response.should send_email { with_tag(''tr'', @contact_info[:full_name]) } knowing that 1) an email is being sent; and 2) the contact info is in a ''p'' tag and only in a ''p'' tag. The length expectation is met -- there are two emails. The send_email expectati...
2009 Apr 09
1
Mailing error in Rails 2.3.2
...deprecated (2.0.0) gem_plugin (0.2.3) hoe (1.8.2) mongrel (1.1.5) pdf-writer (1.1.8) rails (2.3.2) rake (0.8.4) rubyforge (1.0.2) transaction-simple (1.4.0) Here is my test mails code: ----------------------------------------------------- sample_mail.rb -> class SampleMail require ''send_email'' def sample_mail() to_addr = ''login-omLZJFyqO6s4Q++5jOxPmw@public.gmane.org'' subject = ''Mail Testing'' body = ''This is a mail to test the mails.'' hsh={:to=> to_addr, :subject=> subject, :body=> body} SendEM...
2008 Dec 04
3
The RSpec way of doing this? Need help on validating block
...questions about mocks and how to do good testing in general. Let''s say I''m writing this EmailSender class and I want to make it totally awesomely tested with RSpec. Here''s how far I''ve gotten so far: require ''net/smtp'' class EmailSender def send_email mailer.start(''your.smtp.server'', 25) do |smtp| smtp.send_message("Yay! You got an email!", ''your at mail'', ''other at mail'') end def def mailer Net::SMTP end end describe EmailSender do it "Should use Ne...
2005 Dec 17
13
Rookie with ActionMailer
...7IWo@public.gmane.org /app/controllers/home_controller.rb:34:in `email_list'' script/server:54 jpfeifer-fVOoFLC7IWo@public.gmane.org is my email and is pulled from my database table I''m set up like this: Controller: def email_list email = Email.find(:first) MailList::deliver_send_email(email) end Model: class MailList < ActionMailer::Base def send_email(email) @recipients = email.address @from = ''email-Jbz+COfnBiiw5LPnMra/2Q@public.gmane.org'' @subject = ''thanks for entering the contest'' end end Environment: # Include your app'...
2007 Feb 20
6
How to spec code with multiple (interacting) paths
...ger, emailer, db_updater, do_update_db_step) @logger = logger; @emailer = emailer; @db_updater = db_updater @do_update_db_step = do_update_db_step end def store(data) @logger.log("I was told to store ''#{data}''") @emailer.send_email("Somebody stored ''#{data}''") @db_updater.update_db("SET data = ''#{data}'' WHERE id = 1") if @do_update_db_step end end I need to specify the behaviour of my DataStorer objects when they told to/not to update the databa...
2006 Apr 21
1
Question on Active Mailer
Hi I want to create send emails to users as soon as a product is created; So I created scaffold for Product and before as soon as I do the save I call my send_email method in another controller; Now I want to pass on the Product record we created. I tried sending the product as @product, :product,etc. (tried all) and none work; my idea is to get the product record and put it in the email template like:- "Dear Customer. <%= product.name %> has ar...
2006 Jan 23
1
learning how models, controllers, and views pass data
...dmin::CreateEmailController < Admin::BaseController layout ''admin'' def index write render :action => ''write'' end def write @email = Email.new end def email_list email = Email.find(:all) email.each { |address| MailList::deliver_send_email(address) } redirect_to (:action => @section) end end where I want the user to type a message body into a textarea field: <%= error_messages_for ''email'' %> <!--[form:email]--> <p><label for="email_message">Message</label><br/&g...
2007 Dec 13
1
session.send_notification for emails
...API. It looks like facebooker is using part of a deprecated API, Notifications.send used to take an email part. They now have a Notifications.sendEmail call which will take recipients, subject, text part and fbml part. Looking at the code it seems like I need to add a method to the session "send_email" then I need to add a Parser. Anyone else already tackled it? If not I will. Thanks, Dave
2008 Mar 17
2
Dynamic actions and views
Hi, I have a set of messages stored in the db. These are email messages that I have to send based on some condition. This is not the way I had been doing all these days. I used to create an action in my controller (class Notifier < ActionMailer::ARMailer) and then create an rhtml file with the email content and then say Notifier::deliver_my_email_message to send out the emails. But now that I
2012 Oct 08
11
Problems setting gmail mail
Hello, as attachment my problems concerning gmail Mailer errors in Rails. I hope anyone can help me out with the problem? If there is extra information needed, please tell me what you need more to help me out of my problems! Greetings! Attachments: http://www.ruby-forum.com/attachment/7790/errnoECONNREFUSED.jpg -- Posted via http://www.ruby-forum.com/. -- You received this message
2007 Feb 04
10
Spec''ing ActionMailer
Good morning (Pacific Time). I have a controller action that, as a side-effect, sends an email to an administrator. I want it to do something like this: specify "when someone successfully signs up, an email should be sent to the administrator with the person''s contact page" do post :signup, {...lots o'' params} response should_be success #
2007 Dec 11
1
501 Syntax: HELO hostname - Mail problem
....rb: 451:in `send'' C:/ruby/bin/REShop/vendor/rails/actionmailer/lib/action_mailer/base.rb: 451:in `deliver!'' C:/ruby/bin/REShop/vendor/rails/actionmailer/lib/action_mailer/base.rb: 333:in `method_missing'' C:/ruby/bin/REShop/app/controllers/cart_items_controller.rb:100:in `send_email'' C:/ruby/bin/REShop/app/controllers/cart_items_controller.rb:92:in `place_order'' C:/ruby/bin/REShop/vendor/rails/actionpack/lib/action_controller/ base.rb:1101:in `send'' C:/ruby/bin/REShop/vendor/rails/actionpack/lib/action_controller/ base.rb:1101:in `perform_action_with...
2006 Oct 17
3
action mailer, error Subject: Header must not be multiple
i want to send multiple emails: #my Controller def send_email if params[:group_ids] groups = Group.find(params[:group_ids]) # creates an array called ''groups'' that looks like : [{:id => 1, :title => ''yediot''}, {:id => 2, :title => ''maariv''} ] --- [ 1, 2 ] else groups = [] end...
2010 Jan 24
2
ReceiveFAX and SendFAX questions
Morning, Have some questions regarding receiving and sending faxes... 1:st example: exten => 101,1,Answer() exten => 101,2,Wait(3) exten => 101,3,ReceiveFAX(/var/spool/asterisk/tmp/fax.tiff) exten => 101,4,System(tiff2pdf -p A4 /var/spool/asterisk/tmp/fax.tiff > /var/spool/asterisk/tmp/fax.pdf) exten => 101,5,System(mutt -s 'New FAX for you sir' -a
2012 Apr 24
1
Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
...39; [GEM_ROOT]/gems/actionmailer-3.2.3/lib/action_mailer/base.rb:412:in `deliver_mail'' [GEM_ROOT]/gems/mail-2.4.4/lib/mail/message.rb:229:in `deliver'' app/controllers/access_code_controller.rb:102:in `save_code_request'' app/controllers/access_code_controller.rb:22:in `send_email'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:167:in `process_action'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_controller/metal/rendering.rb:10:in...
2012 Apr 24
1
Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
...39; [GEM_ROOT]/gems/actionmailer-3.2.3/lib/action_mailer/base.rb:412:in `deliver_mail'' [GEM_ROOT]/gems/mail-2.4.4/lib/mail/message.rb:229:in `deliver'' app/controllers/access_code_controller.rb:102:in `save_code_request'' app/controllers/access_code_controller.rb:22:in `send_email'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:167:in `process_action'' [GEM_ROOT]/gems/actionpack-3.2.3/lib/action_controller/metal/rendering.rb:10:in...
2006 Jan 30
5
Action Mailer woes
Hi gang, Im having my first stab at ActionMailer and not having any luck. Perhaps someone could help me out. I generated a a mailer called ItemMailer - its purpose is to take some information that I''ve already gathered in a ToDo list form and to mail it out to the person who is nominated for the task In environment.rb I have; ActionMailer::Base.server_settings = { :address =>