Showing posts with label body. Show all posts
Showing posts with label body. Show all posts

Saturday, March 24, 2012

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 Body

Hello,
I am sending an email in HTML format.
How can I make the body text to be Arial and 12 px size?
Thank You,
Migueluse style or stylesheet.
if client is browser based (yahoo/hotmail) it may break some of the UI.
alternatively you can use style attribute for each of your HTML
elements.
shapper wrote:
> Hello,
> I am sending an email in HTML format.
> How can I make the body text to be Arial and 12 px size?
> Thank You,
> Miguel

HTML Body

Hello,

I am sending an email in HTML format.
How can I make the body text to be Arial and 12 px size?

Thank You,
Migueluse style or stylesheet.

if client is browser based (yahoo/hotmail) it may break some of the UI.
alternatively you can use style attribute for each of your HTML
elements.

shapper wrote:

Quote:

Originally Posted by

Hello,
>
I am sending an email in HTML format.
How can I make the body text to be Arial and 12 px size?
>
Thank You,
Miguel