Ruby on Rails
Sunday, August 2, 2015
I'd like to see what is at app/controllers/contact_controller.rb, line 38.
Liz
On Sunday, August 2, 2015 at 2:11:52 AM UTC-4, sanoy wrote:
-- Liz
On Sunday, August 2, 2015 at 2:11:52 AM UTC-4, sanoy wrote:
Random issue with my ruby on rails application out of the blue. I'm getting a 501 error each time a user tries to submit the form. This error does not occur when I'm running the app locally, it only occurs when I push to Heroku.> heroku logs --tail(The error shows up below)Net::SMTPSyntaxError (501 Sender syntax err$│app/controllers/contact_controller.rb:38:$ def tour_create@message = Message.new(params[:message])@message.type = "Tour"@message.saveif @message.valid?UserMailer.tour_signup(@message).deliver flash[:notice] = "Thank you for your interest in You'll receive an email from us confirming your participation in this Thursday's tour within 24- 48 hours."redirect_to("/tour/confirmed")elseflash.now.alert = "Please fill all fields."render :tour_newendend>usermailer.rbclass UserMailer < ActionMailer::Basedefault from: "string"def tour_signup(message)@message = messagemail(:to => message.email,:cc => "string that is an email goes here",:subject => message.first_name + ", Let's Tour This Wednesday")enddef orientation_signup(message, date)@message = message@date = datemail(:to => message.email,:cc => "email",:subject => message.first_name + ",string that gets sent to users inbox)enddef ask_a_question(message)@message = messagemail(:to => "emailstringgoes here",:subject => message.first_name + " Has A Question")enddef trial_kickoff_confirmation_to_user(message, type) @message = message@date = message.event_time.strftime("%l:%M %P, on %A, %B %-d") @type = typetype_subject = type.split.map(&:capitalize).join(' ') mail(:to => message.email,:subject => "Your #{type_subject} Has Been Scheduled!")enddef trial_kickoff_confirmation_to_hosts(message, type) @message = message@date = message.event_time.strftime("%l:%M %P, on %A, %B %-d") @type = typetype_subject = type.split.map(&:capitalize).join(' ') if type == 'kick-off day'email = 'email'elseemail = 'email'endmail(:to => email,:subject => "#{type_subject} for " + message.first_name + " " + message.last_name)enddef new_member_from_batchbook(member, password) @member = member@password = passwordmail(:to => @email,#:cc => "emailgoes here string",:subject => "#{@first_name}, finish your profile at string.com!")enddef member_import_notification message, status@message = message@status = statusmail(:to => 'em...@string.com',#:cc => "em...@string.com",:subject => "#{@message['first_name']}, import to em...@string.com #{status}!")enddef no_new_member_notificationmail(:to => 'em...@string.com',#:cc => "em...@string.com",:subject => "Import ran. No new members!")endend> .ruby-envbash -c 'echo "POSTMARK_API_TOKEN=`heroku config:get POSTMARK_API_TOKEN`" >> .env'bash -c 'echo "POSTMARK_SMTP_SERVER=`heroku config:get POSTMARK_SMTP_SERVER`" >> .env'bash -c 'echo "POSTMARK_INBOUND_ADDRESS=`heroku config:get POSTMARK_INBOUND_ADDRESS`" >> .env' > Procfile> web: bundle exec rails server -p 3000
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/06f9a77a-1a9c-45b1-8260-fcad1fec8b6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment