Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to send email when view has links
    primarykey
    data
    text
    <p>I am using ruby 1.9.3p194 and Rails 3.2.3.</p> <p>I am facing problem while sending emails whose template has a link in it. I have written following code:</p> <p>invitation_mailer.rb </p> <pre><code>def event_invitation(user, event) @user = user @event = event mail(:to =&gt; @user.email, :subject =&gt; "Invitation to participate in #{@event.name} event") end </code></pre> <p>event_invitation.html.haml</p> <pre><code>Hello, %br %br Your friend #{@event.user.full_name} has invited you to participate in #{@event.name} event. If you want to accept this invitation, use the following link: = link_to calendar_index_url, calendar_index_url %br %br #{t('shared.team')} </code></pre> <p>user.rb</p> <pre><code>def xyz ... InvitationMailer.event_invitation(self, event).deliver end </code></pre> <p>If I remove the link line in the view, I am able to receive emails but not with the link inside the view. But the log shows that an email has been sent.</p> <p>LOG</p> <pre><code> Sent mail to abhimanyu@gmail.com (6117ms) Date: Fri, 02 Nov 2012 20:59:33 +0530 From: invitation@dev.tld To: abhimanyu@gmail.com Message-ID: &lt;5093e6dd6a275_14f733fc536034cd444087@Abhimanyus-iMac.local.mail&gt; Subject: Invitation to participate in new event event Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello, &lt;br&gt; &lt;br&gt; Your friend Abhimanyu Kumar has invited you to participate in new event event. If you want to accept this invitation, use the following link: &lt;a href="http://localhost:3000/calendar"&gt;http://localhost:3000/calendar&lt;/a&gt; &lt;br&gt; &lt;br&gt; Dev Team </code></pre> <p>Any help to figure out the problem would be appreciated. </p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload