I am using this link http://guides.rubyonrails.org/action_mailer_basics.html to send the mail notifications to user upon the creation,deletion and edition of the user and will get the mail.It works fine for me.
Now What i want is when the user is created at the time of the creation we will have the radio button for enabling the mail notification if it is enabled then only it will get the notification mail.So what i need to do????
Any help would be appreciated..
Thank you
In the UserController code only send an e-mail if the user attribute to opt into email is set: