http://www.1gb.ua/wiki/index.php?title=Ruby_On_Rails:_%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_actionmailer&limit=250&action=history&feed=atom
Ruby On Rails: настройка actionmailer - История изменений
2024-03-29T05:19:32Z
История изменений этой страницы в вики
MediaWiki 1.10.1
http://www.1gb.ua/wiki/index.php?title=Ruby_On_Rails:_%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_actionmailer&diff=5374&oldid=prev
Chapay в 20:46, 30 октября 2018
2018-10-30T20:46:27Z
<p></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">← Предыдущая</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Версия 20:46, 30 октября 2018</td>
</tr>
<tr><td colspan="2" align="left"><strong>Строка 5:</strong></td>
<td colspan="2" align="left"><strong>Строка 5:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> :address => 'robots.1gb.ua',</td><td> </td><td style="background: #eee; font-size: smaller;"> :address => 'robots.1gb.ua',</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> :port=>25,</td><td> </td><td style="background: #eee; font-size: smaller;"> :port=>25,</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> :domain => 'sitedomain.<del style="color: red; font-weight: bold; text-decoration: none;">ru</del>'</td><td>+</td><td style="background: #cfc; font-size: smaller;"> :domain => 'sitedomain.<ins style="color: red; font-weight: bold; text-decoration: none;">ua</ins>'</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> } </td><td> </td><td style="background: #eee; font-size: smaller;"> } </td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> config.action_mailer.delivery_method = :smtp</td><td> </td><td style="background: #eee; font-size: smaller;"> config.action_mailer.delivery_method = :smtp</td></tr>
</table>
Chapay
http://www.1gb.ua/wiki/index.php?title=Ruby_On_Rails:_%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_actionmailer&diff=5373&oldid=prev
Chapay в 20:46, 30 октября 2018
2018-10-30T20:46:15Z
<p></p>
<table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;">
<tr>
<td colspan='2' width='50%' align='center' style="background-color: white;">← Предыдущая</td>
<td colspan='2' width='50%' align='center' style="background-color: white;">Версия 20:46, 30 октября 2018</td>
</tr>
<tr><td colspan="2" align="left"><strong>Строка 3:</strong></td>
<td colspan="2" align="left"><strong>Строка 3:</strong></td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> Rails::Initializer.run do |config|</td><td> </td><td style="background: #eee; font-size: smaller;"> Rails::Initializer.run do |config|</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> config.action_mailer.smtp_settings = {</td><td> </td><td style="background: #eee; font-size: smaller;"> config.action_mailer.smtp_settings = {</td></tr>
<tr><td>-</td><td style="background: #ffa; font-size: smaller;"> :address => 'robots.1gb.<del style="color: red; font-weight: bold; text-decoration: none;">ru</del>',</td><td>+</td><td style="background: #cfc; font-size: smaller;"> :address => 'robots.1gb.<ins style="color: red; font-weight: bold; text-decoration: none;">ua</ins>',</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> :port=>25,</td><td> </td><td style="background: #eee; font-size: smaller;"> :port=>25,</td></tr>
<tr><td> </td><td style="background: #eee; font-size: smaller;"> :domain => 'sitedomain.ru'</td><td> </td><td style="background: #eee; font-size: smaller;"> :domain => 'sitedomain.ru'</td></tr>
</table>
Chapay
http://www.1gb.ua/wiki/index.php?title=Ruby_On_Rails:_%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0_actionmailer&diff=5372&oldid=prev
Renton в 22:09, 15 марта 2018
2018-03-15T22:09:48Z
<p></p>
<p><b>Новая статья</b></p><div>Для настройки gem actionmailer Вам потребуется указать следующие параметры в файле environemnts.rb:<br />
<br />
Rails::Initializer.run do |config|<br />
config.action_mailer.smtp_settings = {<br />
:address => 'robots.1gb.ru',<br />
:port=>25,<br />
:domain => 'sitedomain.ru'<br />
} <br />
config.action_mailer.delivery_method = :smtp<br />
config.action_mailer.raise_delivery_errors = true<br />
config.action_mailer.perform_deliveries = true<br />
config.action_mailer.default_charset = 'utf-8'<br />
end<br />
<br />
При инициализации настроек внутри блока Rails::Initializer.run do необходимо обращение к config.action_mailer.smtp_settings, но можно выполнять инициализацию в этом же файле и вне блока простым обращением к ActionMailer:Base.smtp_settings<br />
<br />
[[Категория:Программирование]]<br />
[[Категория:Ruby]]</div>
Renton