Send email in rails - R sir - Run ck editor
0. Check the Mail :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
open console -
PostMailer.welcome_email.deliver_now
............................................................
1. /bin.bash--login + rvm use 2.6.5
2. rails -v
3. Web packer error ::
nvm install v14.10.1
bundle exec rails webpacker:install
4.rails g scaffold Post description:text
or
rails g scaffold User name:string email:string description:text
5. add ck editor gem - link - https://github.com/tsechingho/ckeditor-rails
6.gem 'ckeditor_rails' + bundle
gem "letter_opener", group: :developmentconfig/environments/development.rbconfig.action_mailer.delivery_method = :letter_opener
config.action_mailer.perform_deliveries = true
16. Add mailer --------link ::16.a - rails g mailer Post16.b - in mailer/post_mailer.rb - app/mailers/post_mailer.rb - class PostMailer < ApplicationMailer
def welcome_email
@url = 'http://www.gmail.com'
mail(to: "dwijendra.parashar@yopmail.com", subject: 'Welcome to My Awesome Site')
end
end
note - this is the hard quoted string in mail static i used16.c - views/post_mailer/welcome_email.html.erb - add this code with html_safe -<%= Post.last.text.html_safe %>
16.d -
open console -
PostMailer.welcome_email.deliver_now
17.
gem 'jquery-rails'
yeh gem bhi lagega
this error is coming in every project of email template with
ckeditor , open letter
................................................................................................................................
.....
email template kaise kam karega
send_email karna hai rails se usko dekhna hoga
kisi table mein text naam ka column hai usmein hum ck editor laga dete hein ,
render template email mila hi nai r sir ko usmein --
...
jo design banaya hai wohi data jayega mail ke through
ck editor gem lagana padhega ismein mujhe
table jo banega usmein – text nam ka column rakho bus
open letter laga lo
ck editor laga lo
open letter mein khol kar dekh lo jo ki ck editor mein lgaya hai
model mein text likh do
.................
... Documentation Link ::
https://www.blogger.com/blog/post/edit/4759790771070919523/112344046072181293
Dear Sir ,
Has done application with ckeditor+ mailer+ letter opener – attached screens are there below is the github link
github link - https://github.com/dwijendraparashartech/ckmailertemplate.gitand now work at email_template with the help of chumaroung project and internet
Understanding with the flow of Fee Assignment Module.
Email Template Start ======
.....................................
rails g model InvoiceTemplate template_name:string body:text created_on:datetime from:string cc:string bcc:string created_by:string subject:string email_content:string
rails g model InvoiceEmailContent invoice_no:string invoice_date:string due_date:string user_regards:string
.....................................
rails g scaffold InvoiceTemplate template_name:string body:text created_on:datetime from:string cc:string bcc:string created_by:string subject:string email_content:string invoice_email_content_id:integer
rails g scaffold InvoiceEmailContent invoice_no:string invoice_date:string due_date:string user_regards:string
..........
rails g model CreateNotificationTemplates body:text path:string locale:string handler:string partial:boolean format:string
Comments
Post a Comment