You have successfully signed up to example.com, and your username is: <%= @user.login %>.
To login to the site, just follow this link: <%=h @url %>.
Thanks for joining and have a great day!
html content, can also be the name of an action that you call
" part "text/plain" do |p| p.body = "text content, can also be the name of an action that you call" end end end
h4. Sending emails with attachments Attachments can be added by using the +attachment+ method: class UserMailer < ActionMailer::Base def welcome_email(user) recipients user.email_address subject "New account information" from "system@example.com" content_type "multipart/alternative" attachment :content_type => "image/jpeg", :body => File.read("an-image.jpg") attachment "application/pdf" do |a| a.body = generate_your_pdf_here() end end end h4. Sending multipart emails with attachments Once you use the +attachment+ method, ActionMailer will no longer automagically use the correct template based on the filename. You must declare which template you are using for each content type via the +part+ method. In the following example, there would be two template files, +welcome_email_html.erb+ and +welcome_email_plain.erb+ in the +app/views/user_mailer+ folder. class UserMailer < ActionMailer::Base def welcome_email(user) recipients user.email_address subject "New account information" from "system@example.com" content_type "multipart/alternative" part "text/html" do |p| p.body = render_message("welcome_email_html", :message => "