Forum: Ruby on Rails Help: Script isn't sending any email

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Aa776a6aaefaabca63e989e7042da5e2?d=identicon&s=25 cranberry (Guest)
on 2006-02-28 20:21
I followed the directions to a 'T' from the following website:

However, the script is dying because it says that the <%= first_name %>
value in my notifier view is nil.

here is my code:

Controller code (abridged):

def signup
userid = @session[:user].id
@user = User.find(userid)
@bill = Billing.find(userid)
@transaction =

## some stuff to both billing and transaction ....

if (( && (
Notifier::deliver_transaction_receipt_email(@user, @bill, @transaction)

Notifier model code:

def transaction_receipt_email( user, bill, transaction )
  # Email header info MUST be added here
  @recipients =
  @from = ""
  @subject = "Thank you for your payment"

  # Email body substitutions go here
  @body["first_name"] = user.first_name
  @body["last_name"] = user.last_name
  @body["transaction_id"] =
  @body["amount"] = transaction.amount
  @body["account_balance"] = bill.current_account_balance

View Code:

Dear <%= @first_name %> <%= @last_name %>,

<p>We have successfully received your payment of $<%= @amount %>. Your
account balance is:<br>
<b>$<%= @current_account_balance %></b><br><br>
Transaction id: <%= transaction)id %><br>

<p>Please save this email receipt for your records.

This topic is locked and can not be replied to.