You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.textile
+2-53Lines changed: 2 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,60 +111,9 @@ I recommend using "rvm":https://rvm.io/, the Ruby Version Manager, to create a p
111
111
112
112
h3. Configure Email
113
113
114
-
You must configure the app for your email account if you want your application to send email messages.
114
+
This example application doesn't send email messages. However, if you want your application to send email messages (for example, if you plan to install the Devise @:confirmable@ module) you must configure the application for your email account. See the article "Send Email with Rails":http://railsapps.github.com/rails-send-email.html.
115
115
116
-
h4. Use a Gmail account
117
-
118
-
You'll need to modify two files to include your Gmail username and password:
119
-
120
-
* *config/environments/development.rb*
121
-
* *config/environments/production.rb*
122
-
123
-
<pre>
124
-
config.action_mailer.smtp_settings = {
125
-
address: "smtp.gmail.com",
126
-
port: 587,
127
-
domain: "example.com",
128
-
authentication: "plain",
129
-
enable_starttls_auto: true,
130
-
user_name: ENV["GMAIL_USERNAME"],
131
-
password: ENV["GMAIL_PASSWORD"]
132
-
}
133
-
</pre>
134
-
135
-
You can replace @ENV["GMAIL_USERNAME"]@ and @ENV["GMAIL_PASSWORD"]@ with your Gmail username and password. However, committing the file to a public GitHub repository will expose your secret password.
136
-
137
-
If you're familiar with setting "Unix environment variables":http://en.wikipedia.org/wiki/Environment_variable, it's advisable to leave @config.action_mailer.smtp_settings@ unchanged and set your environment variables in the file that is read when starting an interactive shell (the *~/.bashrc* file for the bash shell). This will keep the password out of your repository.
138
-
139
-
Are you using a bash shell? Use @echo $SHELL@ to find out. For a bash shell, edit the *~/.bashrc* file and add:
140
-
141
-
<pre>
142
-
export GMAIL_USERNAME="myname@gmail.com"
143
-
export GMAIL_PASSWORD="secret*"
144
-
</pre>
145
-
146
-
Open a new shell or restart your terminal application to continue.
147
-
148
-
h4. Configure ActionMailer
149
-
150
-
The example application is set to deliver email in production only. It will raise delivery errors in development but not production.
151
-
152
-
In development, @config.action_mailer.default_url_options@ is set for a host at @localhost:3000@ which will enable links in Devise confirmation email messages to work properly. You'll need to change the @config.action_mailer.default_url_options@ host option from @example.com@ to your own domain for the production environment.
153
-
154
-
You can change these values as needed in these two files:
155
-
156
-
* *config/environments/development.rb*
157
-
* *config/environments/production.rb*
158
-
159
-
h4. Configure Devise for Email
160
-
161
-
Complete your email configuration by modifying
162
-
163
-
* *config/initializers/devise.rb*
164
-
165
-
and setting the @config.mailer_sender@ option for the return email address for messages that Devise sends from the application.
166
-
167
-
h2. Configure Devise
116
+
h3. Configure Devise
168
117
169
118
You can modify the configuration file for Devise if you want to use something other than the defaults:
0 commit comments