Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Components & Controls > Net / Sockets

Net / Sockets Components for network and related use

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-2009, 1:04 PM
VB.NET Forum Idol
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2008
Location: USA
Posts: 816
Reputation: 459
MattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond repute
Default MailMessage AlternateView background image

I have an issue where I'm trying to send out an email with a stretched image for the background and text overlaying the image. The markup I'm using works fine in a browser (IE, Firefox, Opera) but the image shows in-line when I create the view and open it with Outlook 2007.

Code:
		Dim content As String = My.Settings.htmlContent
		Dim view As AlternateView = AlternateView.CreateAlternateViewFromString(content, Nothing, "text/html")

		Dim resource As New LinkedResource("C:\Temp\CustomerMailer\myImage.jpg", "image/jpeg")
		resource.ContentId = "blast"
		resource.TransferEncoding = Mime.TransferEncoding.Base64

		view.LinkedResources.Add(resource)
My.Settings.htmlContent:

Quote:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Sample HtmlView Email</title>
<style type="text/css">
html, body {margin:0; padding:0; width:100%; height:100%; overflow:hidden;}
body {font-family:verdana, arial, sans-serif; font-size:76%;}
#background{position:absolute; z-index:1; width:100%;}
#scroller {position:absolute; width:100%; height:100%; top:0; left:0; overflow:auto; z-index:2;}
#content {padding:10% 30% 10% 30%;}
p {line-height:1.8em; letter-spacing:0.1em; text-align:justify;}
</style>
</head>
<div>
<img id="background" src="cid:blast" alt="" title="" />
</div>
<div id="scroller">
<div id="content">
<p>Some email text</p>
<p>Some more text that is much longer. Some more text that is much longer. Some more text that is much longer.</p>
</div>
</div>
</body>
</html>
If someone can point me in the right direction to stretch the background image and not inline it in an email it would be much appreciated. Thank you in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 11:29 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.