Issue with mails sent by Outbound Email - tridion

We are sending the mails in chunk of thousands through Outbound Email. We have a newsletter with four images embedded on it. But we have faced a problem that one of these four images getting embedded on all the places in newsletter where the other images should appear when we send mails(I mean to say same image is appearing on all the places). Preview of newsletter page is perfectly fine in CMS. Suggest solution if any.
We are sending the mails in chunk of thousands through Outbound Email. We have a newsletter with four images embedded on it. But we have faced a problem that one of these four images getting embedded on all the places in newsletter where the other images should appear when we send mails(I mean to say same image is appearing on all the places). Preview of newsletter page is perfectly fine in CMS. Suggest solution if any.
This is our code in one DWT:
<tr style="background:##header_background_color## url(##TrimSpacesFromString(website_url)##/##TrimSpacesFromString(header_background_image_url)##) repeat-x left top;">
<td style="width:98px; padding:4px 14px 7px">
<a href="##website_url##">
<img src="##EmbedImage(logo)##" width="98" height="98" border="0" alt="##GetKeyValueForTitle('football_club','AC')##"/>
</a>
</td>
<td style="width:453px; padding:0px 14px 7px 0; vertical-align:top;">
another table with data
</td>
</tr>
2nd DWT Code
<tr>
<!-- TemplateBeginRepeat name="list" -->
<td style="<!-- TemplateBeginIf cond="TemplateRepeatIndex<(listCount-1)" -->padding-right<!-- TemplateEndIf --><!-- TemplateBeginIf cond="TemplateRepeatIndex==(listCount-1)" -->padding-left<!-- TemplateEndIf -->:7px;">
<table style="width:285px; padding:0 0 20px 0" cellspacing="0">
<tr>
<!-- TemplateBeginIf cond="image" -->
<td rowspan="2" style="padding:0px 5px 0 0px; width:127px; vertical-align:top;">
<!-- TemplateBeginIf cond="GetTextValueFromCompOrEmbedField(ID,'link', 'external_link','0')!=''" -->
<!-- TemplateBeginIf cond="GetStatusForExternalUrl(GetTextValueFromCompOrEmbedField(ID,'link','external_link','0'))" -->
<a href="##TrimSpacesFromString(GetTextValueFromCompOrEmbedField(ID,'link','external_link','0'))##"
style="color:##header_link_color##; text-decoration:none;" >
<!-- <img src="##EmbedImage(image)##" width="127" height="108" border="0" alt="players" /> -->
<img src="##EmbedImage(image)##" width="127" height="108" border="0" alt="##GetKeyValueForLabel('player','CM')##" />
</a>
<!-- TemplateEndIf -->
</td>
<!-- TemplateEndIf -->
</tr>
</table>
</td>
<!-- TemplateEndRepeat -->
</tr>

There was a defect in earlier versions whereby sending mails multi-threaded or while the system was under heavy load could occasionally cause the image IDs of embedded images or attachments to be a string of zeros instead of a unique ID.
This was hotfixed for 2009 SP1 and incorporated into 2011 SP1 as well.
You are on an earlier version, so the recommended solution is to upgrade to SP1 HR1.

It is an issue in Tridion 2011. It's fixed in 2011 SP1. Whenever there was sending of emails in huge amount occurs then Embedding of Image was not working correctly in Tridion 2011.

Related

css to avoid extra space due to page break in outlook mail , while sending mail from mailchimp?

while sending mail from mailchimp to outlook mail, I'm getting extra space(may be page break).Below is my html skeleton,which i'm sending.
When i keep on adding image2 inside "Td32" in below skeleton i'm finding an extra space between images.
Please can anybody suggest me how to avoid page break or unwanted space?
<table class="T1">
<tr>
<td>
<table class="T2"></table>
<table class="T3">
<tr><td class="Td31">Text</td>
<td class="Td32"><div class="repetableimg1">image1</div>
<div class="repetableimg2">image2</div>
</td></tr>
</table>
<table class="T4"></table>
</td>
</tr>
</table>
Best bet is to eliminate the whitespace (linefeeds, etc) between the closing > and opening <... depending on your platform, you should be able to use a regex similar to this... input.replace(/\>[\s\r\n]+\</g, '><')
Also the table:
<table
border=0
cellpadding=0
cellspacing=0
style="border-collapse: collapse; border-spacing: 0;"
>
<tr>
<td style="padding:0">
...
Email rendering is fairly inconsistent, and best to use 1998 rules regarding your html markup and styling.

Now Outlook and Outlook.com add margins to paragraphs inside cells! How to avoid?

Today I was testing emails and email signatures with outlook.com and while I'm sending from Outlook 2007 I found both add the usual unnecessary paragraph with msoNormal class around my content in the table cells.
That give stupid 13.5pt line-height and other paragraph 14pt bottom margin.
I did managed the line-height issue but I still receive it on outlook.com with that bottom margin (14pt) with spans inside or only text .. with styling or not while it's fine on all other mail providers / clients.
HTML for test
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="80" style="height:13px;">data</td>
<td style="height:13px;">data</td>
</tr>
<tr>
<td width="80" style="height:13px;">data</td>
<td style="height:13px;">data</td>
</tr>
<tr>
<td width="80" style="height:13px;">data</td>
<td style="height:13px;">data</td>
</tr>
</table>
Screenshots
Here after a couple of screenshots for the problem with and without styling:
Without any type of styling
Here is how it should be and how it appears on Gmail while it was sent also from Outlook 2007
There is no way to avoid the Outlook msoNormal gaps on forwarding to Gmail. Here is an interesting article on the topic.
There are ways to limit it's effect though. The gap created between tables is bigger than the gap created between table rows. As you have rows, you are already experiencing the lesser.
The easiest fix would be simply combining your rows into one row with <br>'s separating the lines of text.
Example:
<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100">
address<br>
phone<br>
fax
</td>
<td width="500">
: your address<br>
: your phone<br>
: your fax
</td>
</tr>
</table>
This may also have something to do with the min <td> height. Outlook has a minimum height of 19px, so anything smaller can create unwanted vertical space. There are some line-height hacks, you can try to work around this also.

ASP.NET Web Form not taking up entire screen in FireFox and Chrome but does in IE

We have an asp.net master page that defines our web application layout using Tables. The goal is to have the content page take up the entire available screen real estate after having displayed the header and footer. This works for us fine in IE but does not work as intended in Chrome or FireFox.
What happens with Chrome and FireFox is that the content section expands only to wrap the content, which, in instances like a welcome screen ends up taking only a small portion of the screen leaving a big blank section at the bottom of the screen.
Here is a basic example of how our layout is structured:
<table style=height:80%;width:100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="2">
<!--Header Banner goes here This displays fine-->
</td>
</tr>
<tr style="height:100%" valign="top">
<!--Content Goes Here. Problem is that page only expands
as much as its content section vs filling up the whole page. -->
</tr>
<tr>
<!--Footer Goes here. This works fine!!-->
</tr>
</tbody>
</table>
Your problem is that you're using tables for layout. This would be easily achieved with proper HTML using something like a sticky footer (http://ryanfait.com/sticky-footer).
I'd recommend grabbing the HTML5 boilerplate or similar (http://html5boilerplate.com) and working from there.
If this is an existing web app that you can't change the HTML of then Javascript might be a solution...
There is no good way to specify in CSS that a element should be at least as high as the screen. You have to resort to JavaScript.
Since determining the height of the client are of the screen is again something that every browser version might do slightly differently, it is safest to use jQuery:
// tableID is the ID of your element that you want to take up the space
$("#tableID").height($(window).height());
You are missing some <td></td> and " in your code.
Also add
html,body {
height:100%;
min-height:100%;
}
to the StyleSheet. And HTML is
<table style="height:80%;width:100%;background-color:yellow" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="2" style="background-color:red">
Header Banner goes here This displays fine
</td>
</tr>
<tr valign="top">
<td style="background-color:green;height:100%">Content Goes Here. Problem is that page only expands as much as its content section vs filling up the whole page.</td>
</tr>
<tr>
<td style="background-color:blue">Footer Goes here. This works fine!!</td>
</tr>
</tbody>
</table>
Live preview >> jsfiddle
Set margin-top:0px in your content tr tag

Div alignment Issue in FireFox and Google Chrome

I am using Div in my website to display some links. It works fine in IE, but when i expand that div in firefox and google chrome it goes weird.
Can anybody help me to figure it out. I have googled it but i did not fine any useful solutions.
<td vAlign="top" align="center"><font>-</font></td>
<td align="left" >
<div align="left" style="margin:0 auto; padding:0; display:block;clear:both; position:relative;">
<A class="inkblue" href="javascript:expand(4);">Faculty & Staff</A
</div>
</td>
<td></td>
</tr>
<tr id="e4" style="DISPLAY: none">
<td></td>
This is the code for that section. Please let me know if anything required.
This is the link to site. open it in firefox or chrome and click the link
"Faculty & Staff" under "Campuses" .
I have gone through your site:
I saw that you are using below line double time. Insert this line only one time.
If your are trying to Override some classes then specify different css file name.
<link rel="stylesheet" type="text/css" href="css/nuonline.css">
To overcome your issue:
Currently on click of "Faculty, Events & Campus", you are doing style="display:inline". Rather than doing this way you can remove style attribute itself.
Example:
On click: Remove style attribute style="display:none" for id="e4" or id="e5" or id="e7"
To Reset (that is on next click): Add style attribute as style="display:none" for id="e4" or id="e5" or id="e7"
There is one blank <td></td> remove it and give colspan="2" to next td element

How can we get Watir-Webdriver to work with the IE invalid cert screen?

We've probably all seen this screen when testing, all you need is a HTTPS site with a self signed cert and you get the "There is a problem with this website's security certificate" screen, which requires you to click a link to continue.
With Watir this is no problem, I automate the screen as I would any other webpage, clicking the link according to its text or ID value.
With Watir-Webdriver it's as if nothing inside the HTML can be recognized. and I'm not alone in this See this question
It's not just trying to click a link, nearly anything you try here will fail on this page Even a simple function such as puts browser.text will return an error.
Selenium::WebDriver::Error::NoSuchElementError: Unable to find element with tag name == body
You can view source, use developer tools, or have the browser element spit out it's HTML and plainly see the darned body tag right there, but Webdriver is blind to it for some reason.
I don't know if it is a clue or a red-herring, but I know webdriver uses a ton of XPATH under the hood, and I believe XPATH is case sensitive. and in that regard I see something very unusual when I use puts browser.html against this page, in that every single tag-name is in full upper-case. Somewhat unusual but legal valid HTML in any case. Using browser.html on other pages shows lower case tags. Could this be what is causing webdriver to have so much of a problem with this page?
Does anyone have any bright ideas as to how I might be able to get webdriver to see the link element so I can click it?
Output from the browser object when I ask it for the page HTML
irb(main):019:0> puts $browser.html #note, indentation is added later for clarity
<HTML dir=ltr>
<HEAD>
<TITLE>Certificate Error: Navigation Blocked</TITLE>
<LINK rel=stylesheet type=text/css href="ErrorPageTemplate.css">
<META name=MS.LOCALE content=EN-US>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META content=Yes http-equiv=MSThemeCompatible>
<SCRIPT language=javascript type=text/javascript src="errorPageStrings.js">
</SCRIPT>
<SCRIPT language=javascript type=text/javascript src="httpErrorPagesScripts.js">
</SCRIPT>
<SCRIPT language=javascript type=text/javascript src="invalidcert.js">
</SCRIPT>
</HEAD>
<BODY onload="BodyLoad(); initMoreInfo('infoBlockID');" class=securityError>
<TABLE border=0 cellSpacing=0 cellPadding=0 width=730>
<!-- Main title -->
<TBODY>
<TR>
<TD id=shieldIconAlign vAlign=top rowSpan=3 width=60 align=left>
<IMG id=shieldIcon alt="Shield icon" src="red_shield_48.png">
</TD>
<TD id=mainTitleAlign vAlign=middle align=left>
<H1 id=mainTitle>There is a problem with this website's security certificate</H1>
</TD>
</TR>
<TR>
<TD>
<H3>
<DIV id=linkdiv name="linkdiv"></DIV>
</H3>
</TD>
</TR>
<TR>
<!-- This row is for the the divider-->
<TD id=errorCodeAlign class=errorCodeAndDivider align=right>
<DIV class=divider></DIV>
</TD>
</TR>
<!-- Error Body -->
<TR>
<TD></TD>
<TD>
<H3>
<DIV style="DISPLAY: block" id=CertUnknownCA name="CertUnknownCA">
The security certificate presented by this website was not issued by a trusted certificate authority.
</DIV>
<DIV style="DISPLAY: none" id=CertExpired name="CertExpired"></DIV>
<DIV style="DISPLAY: none" id=CertCNMismatch name="CertCNMismatch"></DIV>
<DIV style="DISPLAY: none" id=CertRevoked name="CertRevoked"></DIV>
<NOSCRIPT id=securityCert1></NOSCRIPT><BR>
<ID id=securityCert2>
Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.
</ID>
</H3>
</TD>
</TR>
<!-- Recommendation-->
<TR>
<TD> </TD>
<TD><H2 id=recommendation><B>We recommend that you close this webpage and do not continue to this website. </B></H2></TD>
</TR>
<!-- close webpage-->
<TR>
<TD> </TD>
<TD id=closeWebpageAlign vAlign=middle align=left>
<H4 id=closeWebpage>
<IMG class=actionIcon border=0 alt="Recommended icon" src="green_shield.png">
Click here to close this webpage.
</H4>
</TD>
</TR>
<!-- continue to site-->
<TR>
<TD> </TD>
<TD id=continueToSiteAlign vAlign=middle align=left>
<H4 id=continueToSite>
<IMG id=ImgOverride class=actionIcon border=0 alt="Not recommended icon" src="red_shield.png">
<A id=overridelink href="http://admanager.qa-prod.local/signups/lead_form" name=overridelink>Continue to this website (not recommended).</A>
</H4>
</TD>
</TR>
<!-- InfoBlock -->
<TR>
<TD id=infoBlockAlign vAlign=top align=right> </TD>
<TD id=moreInformationAlign vAlign=middle align=left>
<H4>
<TABLE>
<TBODY>
<TR>
<TD vAlign=top>
<A onclick="javascript:expandCollapse('infoBlockID', true); return false;" href="#">
<IMG id=infoBlockIDImage class=actionIcon border=0 alt="More information" src="down.png">
</A>
</TD>
<TD vAlign=top>
<SPAN id=moreInfoContainer>
More information
</SPAN>
<NOSCRIPT></NOSCRIPT>
</TD>
</TR>
</TBODY>
</TABLE>
</H4>
<DIV style="DISPLAY: none" id=infoBlockID class=infoBlock>
<P>
<LI id=errorExpl1>If you arrived at this page by clicking a link, check the website address in the address bar to be sure that it is the address you were expecting.
<LI id=errorExpl2>When going to a website with an address such as https://example.com, try adding the 'www' to the address, https://www.example.com.
<P></P>
<P id=moreInfoSeeHelpPF>For more information, see "Certificate Errors" in Internet Explorer Help.
</P>
</LI>
</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
=> nil
irb(main):020:0>
I've done a bit of experimenting, including using the HTML I posted to create my own page, sans any JavaScript. If I work with that page, I find it blocks JavaScript actions. In that case, when I try to do things like browser.text, or browser.link.exists?, I see an IE warning popup that tells me that IE is preventing JS from working on that page. (something I never see on the actual cert error page) And in watir-webdriver I get the same errors that I reported. If I click the choice to allow JS, then I can work with the page in watir-webdriver.
So it appears something in in the very nature of the page is preventing any JS level automation which blocks Webdriver's access to the page.
I see why MS is doing this, they don't want a bogus site to somehow use JavaScript to get around that warning. Apparently the way Watir drives things (via OLE?) isn't seen as something you could do remotely and thus is allowed access to the page.
The solution then is to either use Watir for your IE automation, or make it so the certificate is trusted and thus you do not see the warning.
If you want to use Watir-Webdriver, then you need to add the certificates used on your test servers to the Trusted Root Certification Authorities store. Note NOT the default 'personal' store! When adding the cert, you need to change where it's going to put the cert or you are basically only doing a one time for that session authorization. There will be a warning that now all certificates from that authoritiy will be trusted. I would use this with great care, only on test systems, and only for trusting certs from your own internal test servers.
It's pretty easy to do this after manually proceeding to the page, via double-clicking the red warning reminding you the cert is invalid. If you've done that right, you can close the browser, re-open, do your navigation and not get an error.
driver.goto("javascript:document.getElementById('overridelink').click()")

Resources