Help: Script isn't sending any email

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 =

…save 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 = “[email protected]
@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 %>,

We have successfully received your payment of $<%= @amount %>. Your new account balance is:
$<%= @current_account_balance %>

Transaction id: <%= transaction)id %>

Please save this email receipt for your records.