Derek Levine

Joined

60 Experience
0 Lessons Completed
0 Questions Solved

Activity

So would it look something like this? I'm confused as to where the program takes the email from the database as there isn't a user defined.

class LeadMailer.with(lead: @lead).new_lead.deliver_later < ApplicationMailer
def welcome_email
mail(to: params[:user].email) do |format|
format.html { render layout: 'my_layout' }
format.text
end
end
end

Posted in Get Email from DataBase for creating newsletter

I am trying to create a newsletter, Ive followed this instructional video on how to save the information but I am confused on what to do from the end of the video,

https://www.youtube.com/watch?v=mavV5LH-Z40&feature=emb_title

After checking my console it seems that everything is being saved correctly im just wondering how to now get that information to the action mailer gem