0

I have html page like this

    <b> <p>Adres:<br><a href="http://www.<%= domainpost.content %>" target="_blank"><%= domainpost.content %></a></p></b>
<b> <p>Seller:<br><a href="/users/<%= domainpost.user_id %>"><%= domainpost.user_id %> <%= @users
 %></a></p></b>
<p>Date:<br><%= domainpost.registerdate %></p>

           </div>
              <div class="span3">
              <p>Additional:<br><%= domainpost.additiona %></p>

            <p>Expire date:<br><%= domainpost.expiredate %></p>

           </div>
    </div>


<div class="clearfix">
            <label for="name">
              Additional info:
            </label>
            <div class="input">
              <input type="text" name="infoforseller" id="infoforseller" value="" class="span6 required" role="input" aria-required="true" />
            </div>
          </div>
  </div>

        <button class="btn btn-primary">Send</button>

What i must do to send it via email to <%= domainpost.user_id %> i have actionmailer and its work with after register email

what i must change in this code? what do in controler?

4

2 回答 2

1

只要按照这个..很好的解释和记录。使用 Rails 发送邮件

创建邮件程序

  $ rails generate mailer UserMailer

从控制器中的操作调用此邮件程序,向邮件程序添加一个方法并创建一个与方法同名的邮件程序视图。您可以在此邮件视图中推送视图代码,它应该可以工作。

于 2013-06-28T09:45:09.667 回答
0

您可以在http://railscasts.com/episodes/61-sending-email了解如何在 Rails 中发送电子邮件。

于 2013-06-29T03:42:31.047 回答