Showing posts with label message. Show all posts
Showing posts with label message. Show all posts

Saturday, March 24, 2012

Html email with embeded image-background?

Hi

I want to create an email message that has an image background embeded in the email message Itself

Not referenced to an image on the server. Any one can help please.

HTML Email message background color

An HTML email message contains top/bottom logos, a couple of pictures, and some text in between. The whole message body is basically all white. How can the background color of the surrounding area of that email message be set to gray or whatever color in the recipient's view? Thanks.

for html, the background color is set in the corresponding tag. That is:

<body bgcolor="#fff">
text
</body>

the #fff can be changed out, obviously, to any color that html will recognize (i.e. 6 digit hex web colors)


Oh, and it doesn't have to be in the <body> tag necessarily, either. (e.g., could be the <head> tag)
You can write html code in mail.body:
//create the mail message MailMessage mail =new MailMessage();//set the addresses mail.From =new MailAddress("me@.mycompany.com"); mail.To.Add("you@.yourcompany.com");//set the content mail.Subject ="This is an email"; mail.Body ="<body bgcolor="#fff">text</body>"; mail.IsBodyHtml =true;//send the message SmtpClient smtp =new SmtpClient("127.0.0.1"); smtp.Send(mail);

Wednesday, March 21, 2012

HTML anchor ServerClick

I'm trying to find a simple script for hiding my email until the user
chooses to
send a message. I thought I might be able to do this with the ServerClick
event on
the HTML anchor, setting the valid url there. What happens is that some
JavaScript
code is added, and the url is replaced by call to a "__doPostBack"
function:
href="javascript:__doPostBack('MailBtn','')". All that happens when the link
is clicked
is a reload. What is this function? Somebody know a better way to do this (I
really
don't want to use a cumbersome form).
<script runat="server">
void EmailAnchor_Click(Object sender, EventArgs e)
{
MailLink.HRef = "mailto:myemail@dotnet.itags.org.mindspring.com";
}
</script>
<a id="MailLink" href="http://links.10026.com/?link=mailto:me@dotnet.itags.org.nospam.net"
OnServerClick="EmailAnchor_Click" runat="server">

HTML anchor ServerClick

I'm trying to find a simple script for hiding my email until the user
chooses to
send a message. I thought I might be able to do this with the ServerClick
event on
the HTML anchor, setting the valid url there. What happens is that some
JavaScript
code is added, and the url is replaced by call to a "__doPostBack"
function:
href="javascript:__doPostBack('MailBtn','')". All that happens when the link
is clicked
is a reload. What is this function? Somebody know a better way to do this (I
really
don't want to use a cumbersome form).

<script runat="server">
void EmailAnchor_Click(Object sender, EventArgs e)
{
MailLink.HRef = "mailto:myemail@dotnet.itags.org.mindspring.com";
}
</script
<a id="MailLink" href="http://links.10026.com/?link=mailto:me@dotnet.itags.org.nospam.net"
OnServerClick="EmailAnchor_Click" runat="server"