diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index a813bad..b7f2e2f 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,4 +1,4 @@ class ApplicationMailer < ActionMailer::Base - default from: 'Standard Notes ' + default from: 'Standard Notes <__MAIL__>' layout 'mailer' end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 6bbbb11..ac7f55e 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -25,4 +25,9 @@ class UserMailer < ApplicationMailer user = User.find(user_id) mail(to: user.email, subject: 'Two-factor authentication has been disabled for your account.') end + + def welcome(user) + @email = user.email + mail(to: @email, subject: 'Welcome to your private notes account') + end end diff --git a/app/views/user_mailer/welcome.html.erb b/app/views/user_mailer/welcome.html.erb new file mode 100644 index 0000000..4f156f4 --- /dev/null +++ b/app/views/user_mailer/welcome.html.erb @@ -0,0 +1,223 @@ + + + + + + + +
+
+
+
+
+
+ Welcome to + Standard Notes. +
+
+
+ Registered as <%= @email %> +
+
+
+

+ Hi there, +

+

+ Welcome to your new private notes account. + We created Standard Notes to be a safe, private, and lasting place for your most important work. +

+

+ You should know: +

+
    +
  1. + Your notes are fully encrypted on your device before they're ever sent to our servers. + This means even we can't read the contents of your notes. +
  2. +
  3. + Standard Notes is available on all your devices. Download the + iOS + and + Android + app to go mobile. Use the + web app on the go. Or download the desktop app on + Mac, Windows, and Linux. +
  4. +
+

+ Install instructions for Extensions: +

+
    +
  1. + Open the Standard Notes web or Desktop app +
  2. +
  3. + Press Extensions in the button left corner +
  4. +
  5. + Press on Import Extensions in the button right corner of the new window. +
  6. +
  7. + Enter https://__DOMAIN____PATH__/extensions/repo.json in the field. +
  8. +
  9. + Press Enter on your keyboard. +
  10. +
  11. + Now you can see Editors, Themes and Components which you can install +
  12. +
+

To have all Standard Notes extensions use Standard Notes Extened:

+
+
+
+

Standard Notes Extended

+

+ Unlock entirely new workflows with powerful editors and cloud backup options + with + Extended. + Extended is our paid extensions program, and how we support continued development on Standard Notes. +

+

+ Benefits: +

+
    +
  • +

    Encrypted attachments for your notes stored directly in your Dropbox, Google Drive, or WebDAV.

    +
  • +
  • +

    Unlimited access to powerful extensions, editors, and beautiful themes.

    +
  • +
  • +

    Note version history (up to 100 years)

    +
  • +
  • +

    Automatic daily backups of your data to your email inbox, Dropbox, OneDrive, and Google Drive

    +
  • +
  • +

    Two-factor authentication

    +
  • +
  • +

    Support our mission for privacy and longevity in software

    +
  • +
+ +

As low as

+

$2.48/month

+
+ +
Learn More
+
+
+
+
+
+
+
+ + diff --git a/config/application.rb b/config/application.rb index 3c749e2..feff27c 100644 --- a/config/application.rb +++ b/config/application.rb @@ -79,7 +79,7 @@ module SyncingServer :user_name => ENV['SMTP_USERNAME'], :password => ENV['SMTP_PASSWORD'], :authentication => 'login', - :enable_starttls_auto => true # detects and uses STARTTLS + :enable_starttls_auto => ENV['SMTP_STARTTLS'].present? # detects and uses STARTTLS } # Custom configuration diff --git a/lib/sync_engine/abstract/user_manager.rb b/lib/sync_engine/abstract/user_manager.rb index 26a549a..af92835 100644 --- a/lib/sync_engine/abstract/user_manager.rb +++ b/lib/sync_engine/abstract/user_manager.rb @@ -29,6 +29,7 @@ module SyncEngine else user = @user_class.new(email: email, encrypted_password: hash_password(password)) user.update!(registration_params(params)) + UserMailer.welcome(user).deliver_later return success_auth_response(user, params) end end