Dynamic Images via Substitution Tag is not shown in E-mail - twilio

My E-mail with image module shows blank instead of the four images sent using substitution tag via dynamic templates. URLs are present in Original Message (Gmail), but images are not rendered.
What I've tried:
I've read & tried solutions provided in Can I have an image with a substitution tag in a SendGrid template?, but they do not show the images.
To troubleshoot my problem - I've placed the same substitution tag under text & image modules. Text module for {{images}} shows full URLs, and they do link me to the correct image upon clicking. However, the same {{images}} with exact URLs do not appear in my image module.
My image module HTML is as follows:
<td style="font-size:6px; line-height:10px; padding:0px 0px 0px 0px;" valign="top" align="center"><img class="max-width" border="0" style="display:block; color:#000000; text-decoration:none; font-family:Helvetica, arial, sans-serif; font-size:16px; max-width:100% !important; width:100%; height:auto !important;" width="600" alt="" data-proportionally-constrained="true" data-responsive="true" src="{{images}}"></td>
SendGrid Image for Reference
Original Message from Gmail

Related

Angular Material: Change font-size of <mat-list-item>

I am using Angular Material. I have a form with various fields and list items. I have changed the size of mat-form-field inputs using below
mat-form-field.mat-form-field {
font-size: 14px;
}
However since list are not a part of mat-form-field they are still their default 16px. How can I change the size of the <mat-list-item>?
<mat-list-item *ngFor="let file of files">{{file.name}}<mat-list-item>
Try the following CSS definition:
:host /deep/ .mat-list-item-content {
font-size: 18px;
}
I was actually doing this yesterday for my mat-list-items. h6 turned out to be an appropriate size for me.
<mat-list-item *ngFor="let file of files">
<span style="font-size:12px">
{{file.name}}
</span>
<mat-list-item>
or
<mat-list-item *ngFor="let file of files">
<h6>
{{file.name}}
</h6>
<mat-list-item>
You can add the styling directly to the markup. If you use class to reference CSS file, sometimes it won't work.
<mat-list-item style="font-size: 14px; height: 25px" >Test</mat-list-item>

Difficulty creating very small select statements for Angular Material web app for phone

I have been having trouble creating a web app for a phone using Angular and Material Design components. In order for my web app to work well on a phone, it needs to have small buttons and small select statements. Unfortunately, it looks like the framework is adding a style statement for the select element. That style statement is specifying the width of the element and the width it is specifying is way too big. How can I specify small select statements?
Below are the key parts of the two input files: app.component.html and app.component.css. There is a third section that shows the code that is generated by Angular2 as I see it in Chrome's developer tools. The key part of that code is the style statement (style="width: 139.325px;"). If I change the width using the develop tools then I can get the button size I want. I just don't know how to get the size i want using the CSS file.
---- Resulting Ang2 Code -----
<md-select _ngcontent-c0="" placeholder="Number of players" role="listbox" ng-reflect-model="4" ng-reflect-placeholder="Number of players" class="ng-untouched ng-pristine ng-valid mat-select" tabindex="0" aria-label="Number of players" aria-required="false" aria-disabled="false" aria-invalid="false" aria-owns="md-option-0 md-option-1 md-option-2 md-option-3 md-option-4 md-option-5 md-option-6 md-option-7 md-option-8"><div cdk-overlay-origin="" class="mat-select-trigger"><span class="mat-select-placeholder mat-floating-placeholder" style="width: 139.325px;">Number of players </span><!--bindings={
"ng-reflect-ng-if": "[object Object]"
}--><span class="mat-select-value"><span class="mat-select-value-text">4</span> </span><span class="mat-select-arrow"></span> <span class="mat-select-underline"></span></div><!--bindings={
"ng-reflect-origin": "[object Object]",
"ng-reflect-positions": "[object Object],[object Object",
"ng-reflect-offset-x": 0,
"ng-reflect-offset-y": 0,
"ng-reflect-min-width": "152.3249969482422",
"ng-reflect-backdrop-class": "cdk-overlay-transparent-backdr",
"ng-reflect-has-backdrop": "",
"ng-reflect-open": false
}--></md-select>
---- My attempt to override the css for the select statement in app.component.css -----
md-select{
font-size: 10px;
padding: 1px;
min-width: 12px;
}
md-option{
font-size: 10px;
padding: 1px;
min-width: 12px;
}
---- My app.component.html ---------
<md-select placeholder="Number of players" [(ngModel)]="numPlayers" (ngModelChange)="onChangeNumPlayers()" >
<md-option *ngFor="let mynum of numberOfPlayersList" [value]="mynum.value">{{ mynum.name }}</md-option>
</md-select>
My friend Sergiu from Romania helped me out with this. The framework creates elements that encapsulate the md-select and md-option elements. You cannot set the styles for elements outside of md-select and md-option using app.component.css. In order to control those elements you need to add them to the base styles.css file. These classes were sufficient to shrink the select statement for me.
.mat-select,
.mat-select-trigger,
.mat-select-placeholder,
.cdk-overlay-pane,
.mat-select-panel,
.mat-select-content
{
min-width: 40px !important;
width: 40px !important;
}
.mat-option {
padding: 0 2px!important;
}

Avoid Url to be treated as hyperlinks in Rails Mailer

I'm sending a mailer to users that includes a link to their created post.
This link should be for copying and pasting only, however it delivers automatically as a blue underlined hyperlink.
Any suggestions?
Thanks
<td width="440" height="50" bgcolor="#f5f5f5" style="border:1px solid #e3e3e3; display: block; margin:40px auto;">
<div style="color:#666f67; font-size:16px; font-weight: 400; font-family:sans-serif; text-decoration: none; display:block; text-align:center; padding: 16px;">
url
</div>
</td>
The Bootstrap library is not included in emails as it would be in regular views. If you need to format emails, you'll have to do it inline. For example:
hello
Checkout Mailchimp, they have great resources on how to create email templates.
I hope this helps.
I found another way for future reference, by placing it inside an input field "readonly."
<input type="text" value="www.mylink.com" readonly>

Tinymce error : special effects not working in browser

I added tinymce to my active-admin so I could format large text areas. It works great, I can add effects and save that model. But when I go to browser it just shows html code like this :
<p>Aizaugušu lauksaimniecības zemju apstrāde ar Ahvi zemes frēzi.</p> <p><span style="color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px;"><strong>In Microsoft Office OneNote 2007</strong>, you try to send a note to a mail recipient as an attachment. After you do this, the following text is unexpectedly inserted in the body of a new e-mail message:</span></p> <div class="message" style="margin: 0px; padding: 10px 30px; color: #333333; font-family: 'Segoe UI', Arial, Verdana, Tahoma, sans-serif; font-size: 13px;"><strong>Click the OneNote</strong> attachment if you want to view or edit the notes in OneNote. If you don't have OneNote 2007, you can click the second attachment to view the notes as a Web page.<br /><br />You can download a free OneNote trial version from: `http://r.office.microsoft.com/r/rlidOneNoteTrial?clid=1033&ver=12&app=onenote.exe&p1=12
Instead off text with specified effects.
That is because some Javascript error?
Thanks :)
This is probably due to the content being escaped before it is rendered in your view. Rails does this automatically as a safety precaution. In your view you probably have something like this:
<%= #model.content %>
Try turning off the escaping by doing:
<%= #model.content.html_safe %>
Hope that helps!

Windows Live Writer 2011 embed YouTube video sends a black image to my site instead

I'm developing a blog app, and using windows live writer 2011 to embed a YouTube video is pretty straight forward, but I've encounter a strange issue. Here is what I did,
I copy a link from the YouTube site, for example, http://www.youtube.com/watch?v=3Kk-yZ7VpeA
From WLW I insert video From the web and paste the link in it
WLW shows the video without any problems
I view Source in WLW, it gives the following html <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:bb7a51da-b141-42e1-9e93-72967dd2f73d" class="wlWriterEditableSmartContent"><embed src="http://www.youtube.com/v/3Kk-yZ7VpeA?hd=1" type="application/x-shockwave-flash" wmode="transparent" width="448" height="252"></embed></div>
All these are working fine with preview and everything, but when I publish it, it shows up a black squaure of image instead of the video on my site. Moreover, the html WLW sent to the server is the following: <div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:bb7a51da-b141-42e1-9e93-72967dd2f73d" class="wlWriterEditableSmartContent"><div id="7bd0cee8-cce8-4b10-8833-6e30cefafd64" style="margin:0px;padding:0px;display:inline;"><div><img src="http://127.0.0.1:10000/devstoreaccount1/ray/blog/image/2011/05/videob8758375cccf.jpg" style="border-style:none;" alt="" /></div></div></div>
Note the "embed" tag was no longer there and an "img" was instead created. I don't really know why WLW sent what it sent and how to fix this issue, could someone help point out please.
Thank you so much!
I got it figured out. I added
<supportsEmbeds>Yes</supportsEmbeds>
to wlwmanifest.xml file. Without this line, WLW shows the blog capabilities for "Embeds" as "Unknown" and it messes with the embed tag.

Resources