Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5965679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:40:08+00:00 2026-05-22T19:40:08+00:00

I am trying to create a contact the form gets submitted. But I don’t

  • 0

I am trying to create a contact the form gets submitted. But I don’t receive any email.

In my config/application.rb I have addded.

config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
     ActionMailer::Base.smtp_settings = {
   :address  => "mail.vinderhimlen.dk",
   :port  => 587,
   :user_name  => "asd@vinderhimlen.dk",
   :password  => "x",
   :authentication  => :login
 }

My form:

<%= simple_form_for [@support], :url => { :action => "create" }, :html => { :method => :post } do |f| %>
    <%= f.input :sender_name, :label => 'Navn' %>
    <%= f.input :email, :label => 'E-mail' %>
    <%= f.input :support_type, :collection => ['Feedback', 'Idé', "Rapporter fejl", 'Business', 'Andet'], :prompt => "Valg type", :label => 'Erinde' %>
    <%= f.label :Besked %>
    <%= f.text_area :content, :label => 'Besked', :style => 'width:500px;', %>
    <%= f.submit "submit", :value => 'Send besked' %>
<% end %>

My Supportscontroller:

class SupportsController < ApplicationController
  def new
    # id is required to deal with form
    @support = Support.new(:id => 1)
  end

  def create
    @support = Support.new(params[:support])
    if @support.save
      redirect_to('/', :notice => "Support was successfully sent.")
    else
      flash[:alert] = "You must fill all fields."
      render 'new'
    end
  end
end

My Support model:

class Support
  include ActiveModel::Validations

  validates_presence_of :email, :sender_name, :support_type, :content 
  # to deal with form, you must have an id attribute
  attr_accessor :id, :email, :sender_name, :support_type, :content

  def initialize(attributes = {})
    attributes.each do |key, value|
      self.send("#{key}=", value)
    end
    @attributes = attributes
  end

  def read_attribute_for_validation(key)
    @attributes[key]
  end

  def to_key
  end

  def save
    if self.valid?
      Notifier.support_notification(self).deliver
      return true
    end
    return false
  end
end

My config/enviroments/devolpment:

Konkurranceportalen::Application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # In the development environment your application's code is reloaded on
  # every request.  This slows down response time but is perfect for development
  # since you don't have to restart the webserver when you make code changes.
  config.cache_classes = false

  # Log error messages when you accidentally call methods on nil.
  config.whiny_nils = true

  config.perform_delivery = true

  # Show full error reports and disable caching
  config.consider_all_requests_local       = true
  config.action_view.debug_rjs             = true
  config.action_controller.perform_caching = false

  # Don't care if the mailer can't send
  config.action_mailer.raise_delivery_errors = true

  # Print deprecation notices to the Rails logger
  config.active_support.deprecation = :log

  # Only use best-standards-support built into browsers
  config.action_dispatch.best_standards_support = :builtin
end

My rails log on when submitting the form:

Started POST "/supports" for 127.0.0.1 at 2011-05-31 11:15:35 +0200
  Processing by SupportsController#create as HTML
  Parameters: {"utf8"=>"Ô£ô", "authenticity_token"=>"bn05TaU4o6TwLVwYH0PgnDyYouo
P1HptzW3HHY2QV/s=", "support"=>{"sender_name"=>"asdasd", "email"=>"ssad@sazdasd.
dk", "support_type"=>"Id├®", "content"=>"asdasd"}, "commit"=>"Send besked"}
  ←[1m←[36mSQL (0.0ms)←[0m  ←[1mSELECT SUM(`tags`.`konkurrancers_count`) AS sum_
id FROM `tags`←[0m
  ←[1m←[35mSQL (8.0ms)←[0m  describe `kategoris_konkurrancers`
  ←[1m←[36mKonkurrancer Load (1.0ms)←[0m  ←[1mSELECT `konkurrancers`.* FROM `kon
kurrancers`←[0m
  ←[1m←[35mCACHE (0.0ms)←[0m  SELECT `konkurrancers`.* FROM `konkurrancers`
  ←[1m←[36mTag Load (1.0ms)←[0m  ←[1mSELECT `tags`.* FROM `tags`←[0m
Rendered notifier/support_notification.html.erb (1.0ms)

Sent mail to asd@vinderhimlen.dk (1752ms)
Date: Tue, 31 May 2011 11:15:39 +0200

From: ssad@sazdasd.dk

To: asd@vinderhimlen.dk

Message-ID: <4asdqweb124ce_16cc85248bc677b3@Home-Pc.mail>

Subject: =?UTF-8?Q?New_Id=C3=A9?=

Mime-Version: 1.0

Content-Type: text/html;

 charset=UTF-8

Content-Transfer-Encoding: quoted-printable



=EF=BB=BFhello world!

asdasd=

Redirected to http://localhost:3000/
Completed 302 Found in 4503ms
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:40:09+00:00Added an answer on May 22, 2026 at 7:40 pm

    To trigger mails in dev mode, add this to your development.yml file:

    config.action_mailer.perform_deliveries = true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a contact form using the remote_form_tag, but I cannot
I'm trying to create a new contact and add it to the AddressBook but
I am new to ASP.NET, and I am trying to create a contact form
I'm trying to create a simple contact form for my MVC app. So far
I'm playing around with MVC3 and trying to create a simple contact form that
I'm trying to create a contact form. However at the top of the form
I'm trying to create a contact form using phpMailer and I get in firebug
Trying to install this contact form: http://www.catswhocode.com/blog/how-to-create-a-built-in-contact-form-for-your-wordpress-theme I'm getting HUGE gaps between fields: http://themeforward.com/demo2/features/contact-form/
I'm trying to create a simple message form using navigateToURL() and PHP mail(). But
I am trying to create a new contact using Dynamic Entity. The sample i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.