Better site email with tracking

Hello! we been running a heavily modified version since 7.

I'm going to share some of our site e-mail changes.

 

First make an external reference folder for your e-mail; our is "/misc/email/" you can use the attached images for social links and make a smaller logo around 200px wide

 

1. responsive e-mail with logo:

edit: /templates/base/_email_header.html

Copy / Paste / Edit / Change Links...

<html><head></head>
<body bgcolor="#eee" style="margin:0; padding:0;">

<div style="padding:10px; background-color:#eee;">

    <table width="95%" style="max-width: 600px;" border="0" cellspacing="0" cellpadding="0" align="center">  

        <tr><td valign="top">
            
            <div style="border-radius:20px;-moz-border-radius:20px;-webkit-border-radius:20px; color:#333; padding:20px; border:1px solid #999; background-color:#fff; font:14px Helvetica Neue, Helvetica, Arial, Verdana, sans-serif;">
                <div style="border-bottom:2px solid #eee; padding-bottom:10px; margin-bottom:20px; font-weight:bold; font-size:14px; color:#999;" align="center">
                <a href="http://www.DOMAIN.com/"><img src="http://www.DOMAIN.com/misc/email/emaillogo.png" /></a><BR>
                <a href="http://www.DOMAIN.com/member.php" target="_blank" style="text-decoration:none">Home</a> | 
                <a href="http://www.DOMAIN.com/forum/" target="_blank" style="text-decoration:none" >Forums</a> | 
                <a href="http://www.DOMAIN.com/blogs/home/" target="_blank" style="text-decoration:none">Blogs</a> | 
                <a href="http://www.DOMAIN.com/m/classified/home/" target="_blank" style="text-decoration:none">Classifieds</a>
                </div>

 

2. Social links on footer

edit: /templates/base/_email_footer.html

Copy / Paste / Edit / Change Links...

            <BR>Show some love!<BR>
            <a href="https://"FACEBOOK URL"><img src="http://www.DOIMAIN.com/misc/email/facebook.jpg" width="32" height="32" /></a> 
            <a href="https://"TWITTER URL"><img src="http://www.DOIMAIN.com/misc/email/twitter.jpg" width="32" height="32" /></a> 
            <a href="https://"GOOGLE PLUS URL"><img src="http://www.DOIMAIN.com/misc/email/google-plus.jpg" width="32" height="32" /></a> 
            <a href="https://"PINTEREST URL"><img src="http://www.DOIMAIN.com/misc/email/pinterest.jpg" width="32" height="32"/></a>
            </div>

        </td></tr>

        <tr><td valign="top">
                <div style="margin-top:5px; text-align:center; color:#999; font:11px Helvetica Neue, Helvetica, Arial, Verdana, sans-serif;">
                    <bx_text:_sys_email_footer_info />
                </div>                    
                <div style="margin-top:5px; text-align:center; color:#999; font:11px Helvetica Neue, Helvetica, Arial, Verdana, sans-serif;">
                    <BoonexEmailFooter>
                </div>
        </td></tr>

    </table>

</div>
</body></html>

 

3. Attach Google Analytics to e-mail templates

goto: admin>settings>e-mail templates...

insert code to the bottom of the templates above "<bx_include_auto:_email_footer.html />" you want to track (replace with your tracking ID)

<img src="http://www.google-analytics.com/collect?v=1&tid=UA-XXXXX-XX&cid=<recipientID>&t=event&ec=email&ea=open&el=<RealName>&cs=%28direct%29&cm=email&cn=Site+Email"/>

This has to be done in the templates since it references <recipientID> and <RealName> for tracking.

 

4. Change most used templates to something more attractive to your users.

-Friendship Request

change subject to " Friendship request from <Sender>! "

-Friendship Request Accepted

change subject to " <Sender> accepted your friendship request! "

-New message notification with message text

change subject to " New message from <ProfileReference>! "

 

5. Make all site mail send notification e-mails with text...

Edit: /templates/base/mail_box_compose_message.html and /templates/base/mail_box_replay_message.html

find:

        		<div class="messages_options">
        			<label><input type="checkbox" id="to_mail"/>__send_copy_to__</label>
        			<br />
        			<label><input type="checkbox" id="to_my_mail"/>__send_copy_my__</label>
        			<br />
        			<label><input type="checkbox" id="notify_mail"/>__notify__</label>
        		</div>

and replace it to:

        		<div class="messages_options">
        			<label><input type="checkbox" id="to_mail" checked/></label>
        		</div>

 

Finished product is pretty nice - See attached "example.jpg"

 

facebook.jpg · 853B · 553 views
google-plus.jpg · 1.2K · 439 views
pinterest.jpg · 1.6K · 444 views
twitter.jpg · 984B · 420 views
example.jpg · 63.5K · 623 views
Quote · 28 Sep 2015

A few suggestions:

 

1. it is better to put a copy of _email_header.html, etc in in a custom template's folder and make the desired changes there.  It's a better practice than altering core files in the templates/base folder.

 

2. Replace   http://www.DOMAIN.com/    with   <bx_url_root />

 

For example  <bx_url_root />member.php

 

 

That way the exact same code can be used on any site. Your first block of code would become this, and would work on any site without alteration:

<html><head></head>
<body bgcolor="#eee" style="margin:0; padding:0;">

<div style="padding:10px; background-color:#eee;">

    <table width="95%" style="max-width: 600px;" border="0" cellspacing="0" cellpadding="0" align="center">  

        <tr><td valign="top">
            
            <div style="border-radius:20px;-moz-border-radius:20px;-webkit-border-radius:20px; color:#333; padding:20px; border:1px solid #999; background-color:#fff; font:14px Helvetica Neue, Helvetica, Arial, Verdana, sans-serif;">
                <div style="border-bottom:2px solid #eee; padding-bottom:10px; margin-bottom:20px; font-weight:bold; font-size:14px; color:#999;" align="center">
                <a href="<bx_url_root />"><img src="<bx_url_root />misc/email/emaillogo.png" /></a><BR>
                <a href="<bx_url_root />member.php" target="_blank" style="text-decoration:none">Home</a> | 
                <a href="<bx_url_root />forum/" target="_blank" style="text-decoration:none" >Forums</a> | 
                <a href="<bx_url_root />blogs/home/" target="_blank" style="text-decoration:none">Blogs</a> | 
                <a href="<bx_url_root />m/classified/home/" target="_blank" style="text-decoration:none">Classifieds</a>
                </div>
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 28 Sep 2015

I would like to know how to put the photo profile or icon instead of the users name who send the mail.

Thanx 4 all your support

Quote · 22 Mar 2016

I'm trying to put the profile image of the users in emails.


In BxDolEmailTemplates.php BxDolEmailTemplates.php I find the following:

'recipientID' => $aProfile['ID'],
'RealName' => getNickName($aProfile['ID']),
'NickName' => getNickName($aProfile['ID']),
'Username' => getUsername($aProfile['ID']),
'RecipientUrl'=> getProfileLink($aProfile['ID']),
'Email' => $aProfile['Email'],
'Password' => $aProfile['Password'],
'SiteName' => getParam('site_title'),
 

But I can not find the file where 'sender' is defined.

 

 

The friendship request template appears <sender> and <SenderLink>, but I can not find them in any file. someone help me?

Quote · 12 Sep 2017

 

But I can not find the file where 'sender' is defined.

Above values are just common variables, particular email templates have their own list as well, particularly for friend request you can find additional variables in list_pop.php file.

Rules → http://www.boonex.com/terms
Quote · 18 Sep 2017

 

Please note that this question is out of topic, please create separate thread next time.

Please explain how the question is out of topic?  It is related to changing the template of the emails sent out by the system and from what I can see is on topic of the original post which was changing the template of the emails sent out by the system.  Alex, we don't need to alienate users of Dolphin when I don't see they have done anything wrong.

Geeks, making the world a better place
Quote · 18 Sep 2017

 

I'm trying to put the profile image of the users in emails.

This is going to be more involved than you think.  It will involved querying the photo module to retrieve the avatar/profile photo of the member and you if you are going to use remote images then creating an anchor tag to the image on the server and inserting that into the email.  Or you can attach the image to the email.

Geeks, making the world a better place
Quote · 18 Sep 2017

Thank you for pointing this out, I've edited my message.

Please explain how the question is out of topic?

 

Rules → http://www.boonex.com/terms
Quote · 18 Sep 2017

I think it is the right place, as we are improving the email templates.

 

Second: in list_pop.php at line 389 we add 'Senderpic' => get_member_thumbnail ($ iProfileId), In the friendship request template add <img src = "<Senderpic> Then in the friend request email will appear the image of the user requesting the request.


 

Now it only needs that the image is in the same line as the text, but I can not. Any suggestions?



Sin título.png · 28.7K · 519 views
Quote · 18 Sep 2017

Solved:

 

<bx_include_auto:_email_header.html />

 

    <p><b>Querido/a <Recipient></b>,</p>

    <div style="border-radius: 50%;overflow: hidden;float: left;"><Senderpic></div>

    <div style="margin-bottom: 20px; margin-top:35px;"><a href="<SenderLink>"><Sender></a> quiere ser tu amigo. <a href="<RequestLink>">Responde</a>.</div>

    

    <br /> 

    <bx_include_auto:_email_footer.html />

Quote · 18 Sep 2017
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.