Skip to content

Commit

Permalink
Added clarity on documentation and shifted default action mailer down
Browse files Browse the repository at this point in the history
  • Loading branch information
KesterTan committed Sep 13, 2024
1 parent 9b52adb commit 8101454
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/environments/production.rb.template
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ Autolab3::Application.configure do
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5

# default from
ActionMailer::Base.default :from => config_hash['from']

# option for using sendmail
# config.action_mailer.delivery_method = :sendmail

Expand Down Expand Up @@ -112,6 +109,9 @@ Autolab3::Application.configure do
if File.size?("#{Rails.configuration.config_location}/smtp_config.yml")
config_hash = YAML.safe_load(File.read("#{Rails.configuration.config_location}/smtp_config.yml"))

# default from
ActionMailer::Base.default :from => config_hash['from']

config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
Expand Down
4 changes: 2 additions & 2 deletions docs/installation/mailing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Autolab requires mailing to allow users to register accounts and reset passwords. You will also be able to make announcements through Autolab as well. The recommended approach is to setup Autolab to use a SMTP server, such as [mailgun](https://mailgun.com), [SendGrid](https://sendgrid.com), [Amazon SES](https://aws.amazon.com/ses/) or any other valid SMTP mail servers to send out email.

We intend this instructions mainly for production usage.
We intend these instructions mainly for production usage.

To set up Autolab for a custom SMTP Server, configure settings by clicking `Manage Autolab` > `Configure Autolab` > `SMTP Config`.
To set up Autolab (>=3.0.0) for a custom SMTP Server, configure settings by clicking `Manage Autolab` > `Configure Autolab` > `SMTP Config`.

## I don't have a domain name, will mailing work?
Mailing has been tested to work with SendGrid without a domain name (using the IP of the server as the domain name for the purposes of the configuration above), although the absence of a domain name will likely result in the email to be flagged as spam. For the purpose of testing, a testing mailbox service like [MailTrap](https://mailtrap.io/) is recommended.
Expand Down

0 comments on commit 8101454

Please sign in to comment.