Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Has anyone seen this before?

The announcements list is sending e-mails, and everything is good except when the item body has a picture.

Ex:

enter image description here

e-mail sent: enter image description here

HTML code of e-mail:

<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><base href="http://intranet">
<style>
<!--
.headertop1 {
  width: 100%;
}
.headercontent {
  color: #000000;
  font-family: verdana;
  font-size: 16pt;
}
.headercontent em {
  font-weight:bold;
}
.breadcrumb td {
  padding-left: 2px;
  padding-right: 2px;
}
.breadcrumb a{
  font-family: tahoma;
  font-size: 8pt;
}
.content {
  margin-top:6px;
  width: 100%;
  border-bottom:solid 1px #9ca3ad;
}
.toolbar {
  border: 1px solid #e8eaec;
  background-color: #f8f8f9;
  padding-top:3px;
  padding-bottom:6px;
  padding-right:3px;
  padding-left:3px;
}
.toolbarbutton a, .toolbarsep {
  font-family: verdana;
  font-size: .68em;
  padding-left: 3px;
  padding-right: 3px;
}
.toolbarbutton a{
  text-decoration: none;
}
.toolbarsep {
  color:#c7cbd1;
}
.spacer {  
  height: 10px;
  font-size: 1px;
  line-height: 1px;
}
.formline,  .noheight {
  height: 1px;
  font-size: 1px;
  line-height: 1px;
}
.formlabel, .formbody, .digestlabel, .altdigestlabel, .deletedlabel, .altdeletedlabel  {
  font-family: tahoma; 
  font-size:8pt; 
  padding: 0px 7px 0px 7px;
  vertical-align: top;
}
.formlabel, .digestlabel, .altdigestlabel, .deletedlabel, .altdeletedlabel  {
  color: #616a76;
  font-weight: bold; 
}
.rulerow  {
  border-bottom:solid 1px #9ca3ad;
  height:0px;
  font-size:1px;
  line-height:0px;
}
.digestlabel a, .altdigestlabel a {
}
.digestlabel a:hover, .altdigestlabel a:hover {
}
.formbody {
  color: #000000;
}
.edited{
  text-decoration:line-through;
  color:#9ca3ad;
}
.descriptiontext {
  color: #9ca3ad;
  font-family: tahoma; 
  font-size: 8pt; 
  padding-top:5px;
  padding-bottom:7px;
}
.formline {
  border-bottom: 1px solid #D7DEAC;
}
.editedicon, .newicon, .deletedicon {
  color:#000000;
  font-family: Small Fonts,  Tahoma, Verdana, Sans Serif;
  font-size: 7pt;
  padding-top:0px;
  padding-right:3px;
  padding-bottom:1px;
  padding-leftt:2px;
  position: relative;
  top:2px;
  margin-right:8px;
  margin-left:8px;
  font-weight:normal;
}
.editedicon {
  background-color:#ffffcc;
}
.newicon {
  background-color:#b1faa2;
}
.deletedIcon {
  background-color:#ffcccc;
 }
.messagespace {
  color: #5D6437;
  font-family: tahoma; 
  font-size: 8pt; 
  padding-top:5px;
  padding-bottom:7px;
}
.editedexample {
  background: #FFFFBF;
  padding:1px;
}
.vh, .vb, .altvb, .deleted, .altdeleted{
  font-weight: normal;
  text-align: left; 
  text-decoration: none; 
  vertical-align: top;
  font-size: 8pt;  
  font-family: tahoma, sans-serif;
  padding-left:  5px; 
  padding-right: 8px;
}
.vb, .altvb, .deleted, .altdeleted, .digestlabel, .altdigestlabel, .formlabel, .formbody {
  border-bottom:solid 1px #e8eaec;
  padding-top:2px;
  padding-bottom:5px;
}
.vb div.nobr, .altvb div.nobr {
  white-space:nowrap;
}
.vh {
  color:#76808e;
  font-weight:bold;
  padding-top:7px;
  padding-bottom:6px;
  white-space:nowrap;
}
.vb, .altvb {
  color:#616a76;
}
.altvb, .altdigestlabel, .altdeleted, .altdeletedlabel, .formlabel, .formbody {
  background: #f8f8f9; 
}
.digesttext {
  color: #000000;
}
.deleted, .deletedlabel, .altdeleted, .altdeletedlabel {
  text-decoration: line-through;
  color:#9ca3ad;
}
.deleted a, .altdeleted a {
  color:#9ca3ad;
  text-decoration:line-through;
}
-->
</style>
 </head>
 <body>
  <table class="headertop1" cellspacing="0" cellpadding="0">
   <tr><td class="headercontent">
    <table class="breadcrumb" cellspacing="0" cellpadding="0" width="100%"><tr><td><a href="http://intranet">NEB Intranet</a></td></tr></table> <em>test2</em> has been added
   </td>
  </tr></table>  
  <table class="content" cellspacing="0" cellpadding="0">
   <tr>
    <td colspan="3">
     <table class="toolbar" cellspacing="0" cellpadding="0" width="100%"><tr><td>
      <table cellspacing="0" cellpadding="0" border="0">
       <tr>
        <td class="toolbarbutton"><a href="http://intranet/_layouts/MySubs.aspx">Modify my alert settings</a></td>
        <td class="toolbarsep">|</td>
        <td class="toolbarbutton"><a href="http://intranet/Lists/2sale/DispForm.aspx?ID=13">View  test2</a></td>
        <td class="toolbarsep">|</td>
        <td class="toolbarbutton"><a href="http://intranet/Lists/2sale">View  4sale</a></td>
        <td class="toolbarsep">|</td>
        <td class="toolbarbutton"><a href="http://intranet/_layouts/mobile/dispform.aspx?List=490C2E76-867C-4C7E-8422-898E938B0E19&amp;ID=13">Mobile View</a></td> 
       </tr>
      </table>
     </td></tr></table>
    </td>
   </tr>
   <tr><td colspan="3" class="spacer"> &nbsp;</td></tr>
   <tr>
    <td class="formlabel">Title:</td>
    <td class="formbody"> test2&nbsp;</td>
    <td class="altvb">&nbsp;</td>
   </tr>
   <tr>
    <td class="formlabel">Body:</td>
    <td class="formbody"> <div class="ExternalClass5187AB5A25C743AE84D547D5FFC4DFAF"><div>
<html dir="ltr">
<head>

<meta name="Generator" content="Microsoft SafeHTML">

<style id="owaParaStyle">
</style>
</head>
<body>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<p></p>
<img style="width:560px;height:228.4989429175476px">
<p></p>
<br>
<br>
<p></p>
</div>
</body>
</html>
</div>
</div>&nbsp;</td>
    <td class="altvb">&nbsp;</td>
   </tr>
   <tr>
    <td class="formlabel">DisplayHomePage:</td>
    <td class="formbody"> No&nbsp;</td>
    <td class="altvb">&nbsp;</td>
   </tr>
   <tr>
    <td class="formlabel">E-Mail Sender:</td>
    <td class="formbody"> <a href="mailto:lin@company.com">lin@company.com</a>&nbsp;</td>
    <td class="altvb">&nbsp;</td>
   </tr>
   <tr>
    <td class="formlabel">E-Mail To:</td>
    <td class="formbody"> 4sale test &lt;4sale@spmail.company.com&gt;&nbsp;</td>
    <td class="altvb">&nbsp;</td>
   </tr>
   <tr>
    <td class="formlabel">E-Mail From:</td>
    <td class="formbody"> Lin, LastName &lt;lin@company.com&gt;&nbsp;</td>
    <td class="altvb">&nbsp;</td>
   </tr>
   <tr>
    <td class="formlabel">E-Mail Subject:</td>
    <td class="formbody"> test2&nbsp;</td>
    <td class="altvb">&nbsp;</td>
   </tr>
   <tr>
    <td colspan="3" class="descriptiontext">Last Modified 3/12/2013 10:10 AM by Lin, LastName</td>
   </tr>
  </table>
 </body>
</html>

Any help is greatly appreciated. Thank you for reading.

share|improve this question
    
How are you generating the HTML for the body? There seems to be a number of issues like multiple <HTML> tags and your image tag does not have a src attribute. It should be <img style="width:560px;height:228.4989429175476px" src="URLOfImage"/> –  Ryan Erickson Mar 12 '13 at 20:28
    
That is the e-mail HTML, to see this I open the message in outlook, go to: Actions (under tags section)-->Other Actions--> view Source. I did notice the src missing, but I am not sure why it is missing. –  MicroSumol Mar 13 '13 at 3:32
add comment

1 Answer

I do not believe the alerts template will include the picture by default, usually it just spits out a table with data.

If you want to change the notification its likely you will need to dig into Visual Studio, from the list item you could get the public url of the file. By default you will get something like /library/file.png so make sure to add http:// portal /subsite/ from the SPWeb.url property.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.