# Email Sending Now Throws Error in 2.0.2

**URL:** <https://www.ruby-forum.com/t/email-sending-now-throws-error-in-2-0-2/128701>\
**Category:** Rails\
**Created:** [February 10, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/email-sending-now-throws-error-in-2-0-2/128701 "2008-02-10T18:56:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fattymelt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/898d66/32.png) [@fattymelt](https://www.ruby-forum.com/u/fattymelt)\
**Post date:** [February 10, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/email-sending-now-throws-error-in-2-0-2/128701/1 "2008-02-10T18:56:50Z")

</div>

(sorry if this is a dupe - first one didn’t go through)

This code worked fine in 1.1.6. I just migrated to 2.0.2 and I get the  
error below. However, the fix that is suggested in the error does not  
apply  
to my code. I don’t use an explicit call to “render.” Furthermore, the  
latest API documentation for ActionMailer doesn’t mention explicitly  
calling  
“render.” This is driving me nuts! Any help? Thanks!

# code

#In my Controller

def create  
…  
MembershipRequestMailer.deliver\_receipt(@membership\_request)  
…  
end

# In my Mailer

class MembershipRequestMailer \< ActionMailer::Base

def receipt(membership\_request)  
@subject = ‘NASDCTEc Membership Request Submission’  
@recipients = membership\_request.email  
@from = ‘removed\_email\_address@domain.invalid’  
@sent\_on = Time.now  
@body[“membership\_request”] = membership\_request  
@content\_type = “text/html”  
end

def submission(membership\_request)  
@subject = ‘Membership Request Submission’  
@recipients = ‘removed\_email\_address@domain.invalid’  
@from = ‘removed\_email\_address@domain.invalid’  
@sent\_on = Time.now  
@body[“membership\_request”] = membership\_request  
@content\_type = “text/html”  
end

end

# error

Due to changes in ActionMailer, you need to provide the mailer\_name  
along  
with the template name.

render “user\_mailer/signup”  
render :file =\> “user\_mailer/signup”

If you are rendering a subtemplate, you must now use controller-like  
partial  
syntax:

render :partial =\> ‘signup’ # no mailer\_name necessary

–  
View this message in context:  
[http://www.nabble.com/Email-Sending-Now-Throws-Error-in-2.0.2-tp15394386p15394386.html](http://www.nabble.com/Email-Sending-Now-Throws-Error-in-2.0.2-tp15394386p15394386.html)  
Sent from the RubyOnRails Users mailing list archive at [Nabble.com](http://Nabble.com).
