From 0444f1a6cbea1baebfe6c690222e8c4b586724b8 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 27 Jan 2020 13:07:08 -0300 Subject: [PATCH] enviar correos en texto plano --- ...ructions.haml => confirmation_instructions.html.haml} | 0 .../devise/mailer/confirmation_instructions.text.haml | 5 +++++ .../{email_changed.haml => email_changed.html.haml} | 0 app/views/devise/mailer/email_changed.text.haml | 6 ++++++ ...structions.haml => invitation_instructions.html.haml} | 0 .../{password_change.haml => password_change.html.haml} | 0 app/views/devise/mailer/password_change.text.haml | 3 +++ ...ctions.haml => reset_password_instructions.html.haml} | 0 .../devise/mailer/reset_password_instructions.text.haml | 9 +++++++++ ...k_instructions.haml => unlock_instructions.html.haml} | 0 app/views/devise/mailer/unlock_instructions.text.haml | 7 +++++++ app/views/layouts/mailer.text.haml | 3 ++- 12 files changed, 32 insertions(+), 1 deletion(-) rename app/views/devise/mailer/{confirmation_instructions.haml => confirmation_instructions.html.haml} (100%) create mode 100644 app/views/devise/mailer/confirmation_instructions.text.haml rename app/views/devise/mailer/{email_changed.haml => email_changed.html.haml} (100%) create mode 100644 app/views/devise/mailer/email_changed.text.haml rename app/views/devise/mailer/{invitation_instructions.haml => invitation_instructions.html.haml} (100%) rename app/views/devise/mailer/{password_change.haml => password_change.html.haml} (100%) create mode 100644 app/views/devise/mailer/password_change.text.haml rename app/views/devise/mailer/{reset_password_instructions.haml => reset_password_instructions.html.haml} (100%) create mode 100644 app/views/devise/mailer/reset_password_instructions.text.haml rename app/views/devise/mailer/{unlock_instructions.haml => unlock_instructions.html.haml} (100%) create mode 100644 app/views/devise/mailer/unlock_instructions.text.haml diff --git a/app/views/devise/mailer/confirmation_instructions.haml b/app/views/devise/mailer/confirmation_instructions.html.haml similarity index 100% rename from app/views/devise/mailer/confirmation_instructions.haml rename to app/views/devise/mailer/confirmation_instructions.html.haml diff --git a/app/views/devise/mailer/confirmation_instructions.text.haml b/app/views/devise/mailer/confirmation_instructions.text.haml new file mode 100644 index 00000000..38e4c548 --- /dev/null +++ b/app/views/devise/mailer/confirmation_instructions.text.haml @@ -0,0 +1,5 @@ += t('.greeting', recipient: @email) +\ += t('.instruction') +\ += confirmation_url(@resource, confirmation_token: @token) diff --git a/app/views/devise/mailer/email_changed.haml b/app/views/devise/mailer/email_changed.html.haml similarity index 100% rename from app/views/devise/mailer/email_changed.haml rename to app/views/devise/mailer/email_changed.html.haml diff --git a/app/views/devise/mailer/email_changed.text.haml b/app/views/devise/mailer/email_changed.text.haml new file mode 100644 index 00000000..e5216a5a --- /dev/null +++ b/app/views/devise/mailer/email_changed.text.haml @@ -0,0 +1,6 @@ += t('.greeting', recipient: @email) +\ +- if @resource.try(:unconfirmed_email?) + = t('.message', email: @resource.unconfirmed_email) +- else + = t('.message', email: @resource.email) diff --git a/app/views/devise/mailer/invitation_instructions.haml b/app/views/devise/mailer/invitation_instructions.html.haml similarity index 100% rename from app/views/devise/mailer/invitation_instructions.haml rename to app/views/devise/mailer/invitation_instructions.html.haml diff --git a/app/views/devise/mailer/password_change.haml b/app/views/devise/mailer/password_change.html.haml similarity index 100% rename from app/views/devise/mailer/password_change.haml rename to app/views/devise/mailer/password_change.html.haml diff --git a/app/views/devise/mailer/password_change.text.haml b/app/views/devise/mailer/password_change.text.haml new file mode 100644 index 00000000..fe4c1ea5 --- /dev/null +++ b/app/views/devise/mailer/password_change.text.haml @@ -0,0 +1,3 @@ += t('.greeting', recipient: @resource.email) +\ += t('.message') diff --git a/app/views/devise/mailer/reset_password_instructions.haml b/app/views/devise/mailer/reset_password_instructions.html.haml similarity index 100% rename from app/views/devise/mailer/reset_password_instructions.haml rename to app/views/devise/mailer/reset_password_instructions.html.haml diff --git a/app/views/devise/mailer/reset_password_instructions.text.haml b/app/views/devise/mailer/reset_password_instructions.text.haml new file mode 100644 index 00000000..3d0fe64d --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.text.haml @@ -0,0 +1,9 @@ += t('.greeting', recipient: @resource.email) +\ += t('.instruction') +\ += edit_password_url(@resource, reset_password_token: @token) +\ += t('.instruction_2') +\ += t('.instruction_3') diff --git a/app/views/devise/mailer/unlock_instructions.haml b/app/views/devise/mailer/unlock_instructions.html.haml similarity index 100% rename from app/views/devise/mailer/unlock_instructions.haml rename to app/views/devise/mailer/unlock_instructions.html.haml diff --git a/app/views/devise/mailer/unlock_instructions.text.haml b/app/views/devise/mailer/unlock_instructions.text.haml new file mode 100644 index 00000000..cf06927b --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.text.haml @@ -0,0 +1,7 @@ += t('.greeting', recipient: @resource.email) +\ += t('.message') +\ += t('.instruction') +\ += unlock_url(@resource, unlock_token: @token) diff --git a/app/views/layouts/mailer.text.haml b/app/views/layouts/mailer.text.haml index 36d87bd3..7edd2beb 100644 --- a/app/views/layouts/mailer.text.haml +++ b/app/views/layouts/mailer.text.haml @@ -1,3 +1,4 @@ = yield - +\ += '-- ' = t('.signature')