I have a couple of different mailers setup on my system. One is working fine and the other gives no errors but doesn't send out an email.
The mailer that works looks like this:
class UserMailer < ActionMailer::Base
default from: "info#footballpoolmania.com"
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.user_mailer.password_reset.subject
#
def password_reset(user)
#user = user
mail to: user.email, subject: "Password Reset"
end
def confirm_registration(user)
#user = user
mail to: user.email, subject: "Confirm Registration"
end
end
and when sending a password_reset email I get the following in the log:
Started POST "/password_resets" for 127.0.0.1 at 2013-12-06 17:24:32 -0600
Processing by PasswordResetsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"jwGUtsyNRbCfBRFJm3uqcVZA4luHc05Gf0OBm4jyFpI=", "email"=>"robertr2112#yahoo.com", "commit"=>"Reset Password"}
[1m[35mUser Load (0.8ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'robertr2112#yahoo.com' LIMIT 1
[1m[36m (0.2ms)[0m [1mBEGIN[0m
[1m[35mSQL (2.7ms)[0m UPDATE "users" SET "password_reset_token" = $1, "updated_at" = $2 WHERE "users"."id" = 2 [["password_reset_token", "c851e80faeb3612c654c512857cfb29afc6a4665"], ["updated_at", Fri, 06 Dec 2013 23:24:32 UTC +00:00]]
[1m[36m (5.8ms)[0m [1mCOMMIT[0m
[1m[35m (1.2ms)[0m BEGIN
[1m[36mSQL (1.5ms)[0m [1mUPDATE "users" SET "password_reset_sent_at" = $1, "updated_at" = $2 WHERE "users"."id" = 2[0m [["password_reset_sent_at", Fri, 06 Dec 2013 23:24:32 UTC +00:00], ["updated_at", Fri, 06 Dec 2013 23:24:32 UTC +00:00]]
[1m[35m (1.6ms)[0m COMMIT
Rendered user_mailer/password_reset.text.erb (2.3ms)
Sent mail to robertr2112#yahoo.com (316.8ms)
Date: Fri, 06 Dec 2013 17:24:32 -0600
From: info#footballpoolmania.com
To: robertr2112#yahoo.com
Message-ID: <52a25cb0c52be_c94585623640840#debian.mail>
Subject: Password Reset
Mime-Version: 1.0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
To reset your password, click the URL below.
http://localhost:3000/password_resets/c851e80faeb3612c654c512857cfb29afc6a4665/edit
If you did not request your password to be reset, just ignore this email and
your password will continue to stay the same.
Redirected to http://localhost:3000/
Completed 302 Found in 380ms (ActiveRecord: 13.7ms)
Also, the view for the message is defined as password_reset.text.erb and is located in app/views/user_mailer and looks like this:
To reset your password, click the URL below.
<%= edit_password_reset_url(#user.password_reset_token) %>
If you did not request your password to be reset, just ignore this email and
your password will continue to stay the same.
The mailer that doesn't work looks like this:
class PoolMailer < ActionMailer::Base
default from: "info#footballpoolmania.com"
def send_pool_message(pool, subject, msg, allMembers)
#pool = pool
#msg = msg
email_list = Array.new
#pool.users.each do |user|
if allMembers
entries = Entry.where(user_id: user.id)
else
entries = Entry.where(pool_id: pool.id, user_id: user.id, survivorStatusIn:true)
end
if entries.any?
email_list << "#{user.name} <#{user.email}>"
end
end
subject_text = pool.name + ": " + subject
if mail to: email_list, subject: subject_text
puts "Successfully sent email"
return false
else
puts "Couldn't send email"
return true
end
end
end
And the log looks like the following:
Started POST "/pools/2/pool_messages" for 127.0.0.1 at 2013-12-06 17:50:54 -0600
Processing by PoolMessagesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"jwGUtsyNRbCfBRFJm3uqcVZA4luHc05Gf0OBm4jyFpI=", "subject"=>"This is a test", "msg"=>"A test of the group pool message.", "allMembers"=>"false", "commit"=>"Send email", "pool_id"=>"2"}
[1m[36mPool Load (8.9ms)[0m [1mSELECT "pools".* FROM "pools" WHERE "pools"."id" = $1 LIMIT 1[0m [["id", "2"]]
[1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users" INNER JOIN "pool_memberships" ON "users"."id" = "pool_memberships"."user_id" WHERE "pool_memberships"."pool_id" = $1 [["pool_id", 2]]
[1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "entries" WHERE "entries"."user_id" = 2[0m
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "entries" WHERE "entries"."user_id" = 3
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "entries" WHERE "entries"."user_id" = 4[0m
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "entries" WHERE "entries"."user_id" = 5
Rendered pool_mailer/send_pool_message.text.erb (0.7ms)
Redirected to http://localhost:3000/pools/2
Completed 302 Found in 1527ms (ActiveRecord: 11.0ms)
And the view for this email is called send_pool_message.text.erb and is located in app/views/pool_mailer and looks like this:
<%= #msg %>
This is an automated email sent by the pool administer. Do not reply to this
email.
The first mailer sends out the email correctly and logs it as well. The second mailer neither sends an email or logs the email. I'm not sure where to look to correct the problem because I get absolutely zero error messages on any of this.
Any help pointing me in the right direction to fix this would be greatly appreciated.
You need to call .deliver to your mailer function
PoolMailer.send_pool_message(...).deliver
Otherwiser it just generates the email without delivering it
Related
I'm overwriting after_sign_in_path_for in my ApplicationController.
Here's the method, using Domainatrix to parse the URL:
def after_sign_in_path_for(resource)
"#{resource.subdomain}." + host(request.url) + ":3000/profile"
end
def subdomain(url)
Domainatrix.parse(url).subdomain
end
def host(url)
Domainatrix.parse(url).host
end
When I click "submit" once my logs are:
Started POST "/users/sign_in" for 127.0.0.1 at 2014-02-26 17:10:03 -0700
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"0aZ8da/kt+uxPDvzQj4ypyVDgTBW7FzRNR7uHN6Hryo=", "user"=>{"email"=>"EMAIL", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'EMAIL' LIMIT 1
(0.1ms) begin transaction
SQL (0.4ms) UPDATE "users" SET "last_sign_in_at" = ?, "current_sign_in_at" = ?, "sign_in_count" = ?, "updated_at" = ? WHERE "users"."id" = 16 [["last_sign_in_at", Thu, 27 Feb 2014 00:05:30 UTC +00:00], ["current_sign_in_at", Thu, 27 Feb 2014 00:10:03 UTC +00:00], ["sign_in_count", 65], ["updated_at", Thu, 27 Feb 2014 00:10:03 UTC +00:00]]
(1.3ms) commit transaction
Redirected to trevor.lvh.me:3000/profile
Completed 302 Found in 70ms (ActiveRecord: 2.0ms)
It shows it's redirecting to the correct URL, but nothing actually happened.
If I click "submit" a second time, nothing happens and the following log is produced (notice the 2nd to last line):
Started POST "/users/sign_in" for 127.0.0.1 at 2014-02-26 17:10:08 -0700
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"0aZ8da/kt+uxPDvzQj4ypyVDgTBW7FzRNR7uHN6Hryo=", "user"=>{"email"=>"EMAIL", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 16 ORDER BY "users"."id" ASC LIMIT 1
Redirected to trevor.lvh.me:3000/profile
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
To add further mystery, when I change after_sign_in_path_for to:
def after_sign_in_path_for(resource)
if resource.subdomain == subdomain(request.url)
"#{root_url}profile"
end
end
It redirects to trevor.lvh.me:3000/profile correctly.
Any idea what this Filter chain halted as :require_no_authentication rendered or redirected error is?
Replace
def after_sign_in_path_for(resource)
"#{resource.subdomain}." + host(request.url) + ":3000/profile"
end
With
def after_sign_in_path_for(resource)
"http://#{resource.subdomain}." + host(request.url) + ":3000/profile"
end
http:// Protocol is missing.
I am using Devise in my app, and trying to write a spec for updating email ID. The UI works, but the spec is failing. I am reloading the user object as well, before testing against changed email ID.
One thing that I do observe is that there is UPDATE USERS statement being run on the database.
What is the correct way to write the spec?
RSpec spec:
it "should update email" do
#user = subject.current_user
patch :update, id: #user, user: {:email => "john.doe#example1.com"}
#user.reload
expect(#user.email).to eq("john.doe#example1.com")
end
RSpec Error Log:
1) Users::RegistrationsController logged in user should update email
Failure/Error: expect(#user.email).to eq("john.doe#example1.com")
expected: "john.doe#example1.com"
got: "john.doe#example.com"
(compared using ==)
test.log:
ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
(0.2ms) BEGIN
(0.4ms) SAVEPOINT active_record_1
User Exists (0.9ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'john.doe#example.com' LIMIT 1
SQL (4.1ms) INSERT INTO "users" ("created_at", "email", "encrypted_password", "first_name", "last_name", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Sat, 22 Jun 2013 13:12:28 UTC +00:00], ["email", "john.doe#example.com"], ["encrypted_password", "$2a$04$LIRWzphxstpCLTuZjicA..YMW.Ei2V/LlYWP32gfx39nBjhFg5tLe"], ["first_name", "John"], ["last_name", "Doe"], ["updated_at", Sat, 22 Jun 2013 13:12:28 UTC +00:00]]
(0.1ms) RELEASE SAVEPOINT active_record_1
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 457 ORDER BY "users"."id" ASC LIMIT 1
Processing by Users::RegistrationsController#update as HTML
Parameters: {"id"=>"457", "user"=>{"email"=>"john.doe#example1.com"}}
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 457]]
User Exists (0.4ms) SELECT 1 AS one FROM "users" WHERE ("users"."email" = 'john.doe#example1.com' AND "users"."id" != 457) LIMIT 1
Rendered devise/registrations/edit.html.slim within layouts/application (0.2ms)
Completed 200 OK in 73ms (Views: 4.0ms | ActiveRecord: 1.0ms)
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 457]]
(0.2ms) ROLLBACK
Try
it "should update email" do
#user = subject.current_user
patch :update, id: #user, user: {:email => "john.doe#example1.com"}
#user.reload.email.should == "john.doe#example1.com"
end
Or alternatively
it "should update email" do
#user = subject.current_user
expect {
patch :update, id: #user, user: {:email => "john.doe#example1.com"}
#user.reload
}.to change(#user, :email).to("john.doe#example1.com")
end
I have this in the Model:
after_create do |comment|
CommentMailer.comment_email(self).deliver
end
This in CommentMailer:
class CommentMailer < ActionMailer::Base
helper ActionView::Helpers::UrlHelper
include CommentHelper
helper :comment
def comment_email(user, comment, commentable)
mail(to: user.email,
subject: "You have left a comment",
from: "comments#lumeo.com",
bcc: "brian#lumeo.com")
end
end
And this in CommentHelper:
module CommentHelper
def find_commentable
#comment = Comment.find(params[:comment])
params.each do |name, value|
if name =~ /(.+)_id$/
return $1.classify.constantize.find(value)
end
end
nil
end
end
I'm getting this error:
Started POST "/requests/6/comments" for 127.0.0.1 at 2012-11-30 17:28:55 -0800
Processing by CommentsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"R62NH5/EE34FPapEqy7mfpa0wKz18GtSdhH8MGYq2Ec=", "comment"=>{"content"=>"post", "show"=>"true"}, "commit"=>"Create Comment", "request_id"=>"6"}
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 ORDER BY users.created_at DESC LIMIT 1
Request Load (0.3ms) SELECT "requests".* FROM "requests" WHERE "requests"."id" = $1 LIMIT 1 [["id", "6"]]
CACHE (0.0ms) SELECT "requests".* FROM "requests" WHERE "requests"."id" = $1 LIMIT 1 [["id", "6"]]
(0.1ms) BEGIN
SQL (0.4ms) INSERT INTO "comments" ("commentable_id", "commentable_type", "content", "created_at", "show", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["commentable_id", 6], ["commentable_type", "Request"], ["content", "post"], ["created_at", Sat, 01 Dec 2012 01:28:55 UTC +00:00], ["show", true], ["updated_at", Sat, 01 Dec 2012 01:28:55 UTC +00:00], ["user_id", 2]]
(0.2ms) ROLLBACK
Completed 500 Internal Server Error in 136ms
ArgumentError (wrong number of arguments (1 for 3)):
app/mailers/comment_mailer.rb:5:in `comment_email'
app/models/comment.rb:27:in `block in <class:Comment>'
app/controllers/comments_controller.rb:22:in `create'
Looks like simple typos.
Line 7, as noted in the exception:
commentable = #comment.commentable
So, the issues:
You're calling #comment.commentabe, but #comment is nil
Hence the error: undefined method 'commentable' for nil:NilClass
#comment is nil in your mailer method because you're passing it in as comment NOT #comment, yet you're trying to reference it as #comment.
Also, why are you passing in commentable as a parameter, but on line 7 you're setting commentable again - this is redundant? Just use the already available commentable variable that you're passing in as a param. In fact, you seem to be doing this with several variables, yet I can't tell (because you don't show the mailer template) whether or not you're actually using them.
It could be that you could use something simpler like:
So, this should (probably) work:
def comment_email(user, comment, commentable)
mail(to: user.email,
subject: "You have left a comment",
from: "comments#lumeo.com",
bcc: "brian#lumeo.com")
end
If you post your mail template (so I can see what the body of the email looks like) I can help you get the variables into the template.
When I run test with gem 'selenium-webdriver' (with "describe "with valid information", :js => true do")
spec/request/post_pages_spec.rb
require 'spec_helper'
describe "Post pages" do
subject { page }
category = Category.create(name: "Food")
let(:post) { FactoryGirl.create(:post) }
describe "with valid information", :js => true do
it "should create a post" do
fill_in "Title", with: post.title
fill_in "Content", with: post.content
fill_in "Publish", with: Date.today
check "Food"
expect { click_button "Create Post" }.to change(Post, :count).by(1)
end
end
end
I getting error in spec:
Failures:
1) Post pages post creation with valid information should create a post
Failure/Error: expect { click_button "Create Post" }.to change(Post, :count).by(1)
count should have been changed by 1, but was changed by 0
# ./spec/requests/post_pages_spec.rb:35:in `block (4 levels) in <top (required)>'
log/test.log
Started POST "/posts" for 127.0.0.1 at 2012-09-08 01:54:52 +0400
Processing by PostsController#create as HTML
Parameters: {"utf8"=>"✓", "post"=>{"title"=>"Lorem ipsum", "content"=>"Lorem ipsum", "category_ids"=>["", "1"], "publish"=>"2012-09-08"}, "commit"=>"Create Post"}
[1m[35mCategory Load (0.3ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
[1m[35mSQL (5013.9ms)[0m INSERT INTO "posts" ("content", "created_at", "publish", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Lorem ipsum"], ["created_at", Fri, 07 Sep 2012 21:54:52 UTC +00:00], ["publish", Sat, 08 Sep 2012], ["title", "Lorem ipsum"], ["updated_at", Fri, 07 Sep 2012 21:54:52 UTC +00:00]]
SQLite3::BusyException: database is locked: INSERT INTO "posts" ("content", "created_at", "publish", "title", "updated_at") VALUES (?, ?, ?, ?, ?)
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
SQLite3::BusyException: cannot rollback transaction - SQL statements in progress: rollback transaction
Completed 500 Internal Server Error in 5019ms
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
[1m[35m (0.3ms)[0m begin transaction
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
[1m[35mSQL (0.7ms)[0m INSERT INTO "posts" ("content", "created_at", "publish", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Lorem ipsum"], ["created_at", Fri, 07 Sep 2012 21:54:57 UTC +00:00], ["publish", Sat, 08 Sep 2012], ["title", "Lorem ipsum"], ["updated_at", Fri, 07 Sep 2012 21:54:57 UTC +00:00]]
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
Started GET "/posts" for 127.0.0.1 at 2012-09-08 01:54:57 +0400
Processing by PostsController#index as HTML
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts"
[1m[36mCategory Load (0.2ms)[0m [1mSELECT "categories".* FROM "categories" INNER JOIN "categorizations" ON "categories"."id" = "categorizations"."category_id" WHERE "categorizations"."post_id" = 1[0m
Rendered layouts/_navigation.html.erb (1.1ms)
Rendered layouts/_messages.html.erb (0.1ms)
Completed 200 OK in 25ms (Views: 14.8ms | ActiveRecord: 0.3ms)
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "posts"
Started DELETE "/posts/1" for 127.0.0.1 at 2012-09-08 01:54:57 +0400
Processing by PostsController#destroy as HTML
Parameters: {"id"=>"1"}
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1[0m [["id", "1"]]
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "posts" WHERE "posts"."id" = ?[0m [["id", 1]]
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
Redirected to http://www.example.com/posts
Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
But when I run test WITHOUT Selenium (describe "with valid information" do)
Test is green.
Why Selenium doesn't create Post and make the test red ?
How to fix it?
Solution is a specific working of Capibara with Rspec.
I add following file to spec/support/database_cleaner.rb
RSpec.configure do |config|
config.use_transactional_fixtures = false
config.before :each do
if Capybara.current_driver == :rack_test
DatabaseCleaner.strategy = :transaction
else
DatabaseCleaner.strategy = :truncation
end
DatabaseCleaner.start
end
config.after do
DatabaseCleaner.clean
end
end
Added gem in Gemfile:
group :development, :test do
gem 'database_cleaner'
end
$> bundle install
And I add a comment to the following line in spec/spec_helper.rb
RSpec.configure do |config|
#config.use_transactional_fixtures = true
end
Test becomes green.
I have a problem. My mailer sends the same e-mail 4 times. I'm pretty sure I only call it once though. What could be the reason?
Running Rails 3.0.7 on Ruby 1.9.2 and Unicorn, if that matters.
Here is the mailer:
class NotificationMailer < ActionMailer::Base
default :from => "herald#artistsnclients.com"
def order_new(user, order)
#user = user
#order = order
mail( :to => "#{user.name} <#{user.email}>", :subject => "You have one new order to review (##{order.id})" )
end
end
What calls the mailer is a callback in the model Notification:
class Notification < ActiveRecord::Base
attr_accessible :read, :user_id, :happening_type, :happening_id, :happening_status
enum_attr :happening_status, %w(new approved rejected cancelled payed completed accepted new_post)
belongs_to :user
belongs_to :happening, :polymorphic => true
after_create :send_email
private
def send_email
# Send e-mail here
if [:new, :approved, :rejected, :cancelled, :payed, :completed, :accepted].include? self.happening_status
right_mailer = NotificationMailer.method("order_#{self.happening_status}".to_sym)
right_mailer.call(self.user, self.happening).deliver
elsif [:new_post].include? self.happening_status
NotificationMailer.note_new(self.user, self.happening).deliver
end
end
end
The Notification object is created from a callback in the Note model:
class Note < ActiveRecord::Base
...
after_create :notify_artist
private
def notify_artist
self.notifications.create :read => false, :happening_status => :new, :user_id => self.artist_id
end
end
Also, here is the part of the log that belongs to the controller from which the Notification model is created:
Started POST "/notes" for 178.8.127.86 at 2011-07-15 18:03:45 +0000
Processing by NotesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"8UhgV74SUZibcrowriqQZAketiALnkpHMhu0bkuZ4VQ=", "note"=>{"content"=>"Okaaay, *will do*", "order_id"=>"1"}, "commit"=>"Reply"}
[1m[36mUser Load (0.1ms)[0m [1mSELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1[0m
[1m[35mSQL (0.1ms)[0m BEGIN
[1m[36mSQL (0.5ms)[0m [1mdescribe `notes`[0m
[1m[35mAREL (0.3ms)[0m INSERT INTO `notes` (`user_id`, `order_id`, `content`, `created_at`, `updated_at`) VALUES (1, 1, 'Okaaay, *will do*', '2011-07-15 18:03:45', '2011-07-15 18:03:45')
[1m[36mOrder Load (0.1ms)[0m [1mSELECT `orders`.* FROM `orders` WHERE `orders`.`id` = 1 LIMIT 1[0m
[1m[35mNotification Load (0.5ms)[0m SELECT `notifications`.* FROM `notifications` WHERE (`notifications`.happening_id = 12 AND `notifications`.happening_type = 'Note') LIMIT 1
[1m[36mSQL (0.9ms)[0m [1mdescribe `notifications`[0m
[1m[35mAREL (0.3ms)[0m INSERT INTO `notifications` (`read`, `user_id`, `happening_id`, `happening_type`, `created_at`, `updated_at`, `happening_status`) VALUES (0, 2, 12, 'Note', '2011-07-15 18:03:45', '2011-07-15 18:03:45', 'new_post')
[1m[36mUser Load (0.2ms)[0m [1mSELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1[0m
[1m[35mNote Load (0.3ms)[0m SELECT `notes`.* FROM `notes` WHERE `notes`.`id` = 12 LIMIT 1
Rendered notification_mailer/note_new.html.haml (3.6ms)
Sent mail to [MY E-MAIL] (2362ms)
Date: Fri, 15 Jul 2011 18:03:46 +0000
From: herald#artistsnclients.com
To: Dummy <[MY E-MAIL]>
Message-ID: <4e208102724f_55c11225a4584d7#artistsnclients.mail>
Subject: New message in order #1
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>Hello Dummy,</p>
<p>There is a new message in your order #1.</p>
<blockquote>
Okaaay, *will do*
</blockquote>
<hr>
<p>
With lots and lots of love,
<br>
Artists&Clients Staff
</p>
[1m[36mSQL (564.1ms)[0m [1mCOMMIT[0m
Redirected to http://dev.artistsnclients.com/orders/1
Completed 302 Found in 3623ms
Please try newer version of the gem named 0.9.8, I think we managed to fix that bug:
https://rubygems.org/gems/postmark
Let me know if it helped.