mercredi 8 mars 2017

How to set website logo image on signup mail in rails?

I am using rails 5 when user is registered in my website i am sending an email for him for account approval.I want to set website logo with email. How we implement this in rails mailer view file enter image description here

Html for mail template

<!DOCTYPE HTML>
<html>
<title>nytApp Email</title>
    <head>
    </head>
    <body style="font-family: 'arial', sans-serif !important;   font-size: 14px;   line-height: 20px;  color:#3e3e3e; background-color: #f5f5f5; font-weight: 300;">
        <!-- Container Table -->
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td>
                    <table cellpadding="0" cellspacing="0" width="640" style="margin:0 auto; background:#fff;">
                        <tr>
                            <td style="border: 1px solid #f5cd8f;">
                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td style="padding: 25px 15px 20px; border-bottom: 1px solid #f5cd8f;">
                                            <table  align="center" cellpadding="0" cellspacing="0" border="0" width="100%">
                                                <tr>
                                                    <td><%= image_path('logo.png')%></td>
                                                    <td>
                                                        <table cellpadding="0" cellspacing="0" border="0" width="100%" style="font-weight: bold; font-size: 16px;">
                                                            <tr>
                                                                <td style="color: #ff5e00; font-weight: 300; font-size: 20px;">Welcome to Nytapp</td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="padding: 0 15px 20px;">
                                            <table  align="center" cellpadding="0" cellspacing="0" border="0" width="100%">
                                                <tr><td height="10"></td></tr>
                                                <tr>
                                                    <td>Thank you for signing up as Events Promoter!</td>
                                                </tr>
                                                <tr><td height="25"></td></tr>
                                                <tr>
                                                    <td>You are ready to start posting your parties for free. Login to the portal by clicking on the link below:</td>
                                                </tr>
                                                <tr><td height="10"></td></tr>
                                                <tr>
                                                    <td><a href="http://ift.tt/2n8CykL" style="color: #00a8ff;">http://ift.tt/2n1u9mm;
                                                </tr>
                                                <tr><td height="10"></td></tr>
                                                <tr>
                                                    <td>If the above URL does not work try copying and pasting it into your browser.</td>
                                                </tr>
                                                <tr><td height="8"></td></tr>
                                                <tr>
                                                    <td>If you encounter any problem, please contact us at <a href="mailto:admin@nytapp.com" style="color: #333; font-weight: bold; text-decoration: none;">admin@nytapp.com</a></td>
                                                </tr>
                                                <tr><td height="25"></td></tr>
                                                <tr>
                                                    <td>Thank you,</td>
                                                </tr>
                                                <tr>
                                                    <td>The Nytapp team</td>
                                                </tr>
                                                <tr><td height="30"></td></tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="border-top: 1px solid #f5cd8f; vertical-align: middle;  padding: 10px 15px;">
                                            <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                <tr>
                                                    <td>
                                                        <%= image_path('logo.png') %>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>

Aucun commentaire:

Enregistrer un commentaire