No stone for this that I know of.
In fact, due to processing problems, the best way would be to use an external email service provider through an API provider.
However, creating your own distribution system is no different from creating your regular MVC. Only add-ons are mailing lists and mailing lists.
(1) So, you create a model that deals with registration data (: name ,: email ,:, etc.) and a model that deals with the newsletter itself.
(2) The controller that deals with it (CRUD) + (: send). Each recipient sends, sends data to the email program that creates the email, and then sends it.
def send @newsletter = Newsletter.find(:params['id']) @recipients = Recipient.all @recipients.each do |recipient| Newsletter.newsletter_email(recipient, @newsletter).deliver end end
(3) Mailer creates an email, makes changes to each email, if you want to do something like this and return it to the controller’s action to send for delivery.
class Newsletter < ActionMailer::Base default :from => " my_email@example.com ", :content_type => "multipart/mixed" def newsletter_email(recipient, newsletter) # these are instance variables for newsletter view @newsletter = newsletter @recipient = recipient mail(:to => recipient.email, :subject => newsletter.subject) end end
(4) Ofc, you need email program views that look like regular views. Well, in multipart there is:
And ... that’s all. Well, you can use lazy work to send them, since sending more than a few hundred letters may take some time. Several ms times n can be a lot of time.
Good luck.
Krule
source share