in line css is not working for HTML in email using java -


i trying apply, styles in html. positioning content etc.

i can on lay text on image, using auto code generated bulletproof website. cannot apply styles on text.

i have following snippet of html in email:

here's server code creating email:

mimemultipart mimemultipart = new mimemultipart("related"); mimebodypart textbodypart = new mimebodypart(); mimemultipart = new mimemultipart("related"); string cid = contentidgenerator.getcontentid(); textbodypart.settext(messagebody, "us-ascii", "html"); mimemultipart.addbodypart(textbodypart); imagepart.attachfile(file);  imagepart.setcontentid("<" + cid + ">"); mimemultipart.addbodypart(imagepart);   msg.setcontent(mimemultipart);   transport.send(msg); 

<!doctype html public '-//w3c//dtd xhtml 1.0 transitional//en' 'http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd'>  <html xmlns:v="urn:schemas-microsoft-com:vml">  	<head>  		<meta http-equiv="content-type" content="text/html; charset=us-ascii">  	</head>  	<body>  		<table cellpadding="0" cellspacing="0" border="0" width="100%">  			<tr>  				<td background="cid:random number.net"  					style="background-repeat:no-repeat;" valign="top">      <!--[if gte mso 9]><v:rect xmlns:v='urn:schemas-microsoft-com:vml' fill='true'   						stroke='false' style='mso-width-percent:1000;'> <v:fill type='frame' src='cid:ransomnumbernet'   						style='background-repeat:no-repeat;' /><v:textbox style='mso-fit-shape-to-text:true'   						inset='0,0,0,0'><![endif] -->  					<div style="margin-left: 2cm;">  						<br>  							<br>  								<br>  									<br>  										<br>  											<br>  												<br>  													<br>  														<br>  															<br>  																<br>  																	<br>  																		<br>  																			<br>  																				<br>  																					<p>thank order. order information  																						is:</p>  																					<br>  																						<table width="50%" colspan="2">  																							<tbody>  																								<tr>  																									<td width="30%" align="left">order</td>  																									<td width="70%" align="left">xxxx</td>  																								</tr>  																								<tr>  																								  																							</tbody>  																						</table>  																						<table width="50%" colspan="2">  																							<tbody>  																								<tr>  																									<td width="30%" align="left">name</td>  																									<td width="70%" align="left">temp</td>  																								</tr>  																								<tr>  																									<td width="30%" align="left">phone</td>  																									<td width="70%" align="left">555-555-5555</td>  																								</tr>  																							</tbody>  																						</table>  					</div><!--[if gte mso 9]> </v:textbox></v:rect><![endif] -->  				</td>  			</tr>  		</table>  	</body>  </html>

but styles don't apply in email.

thanks in advance time.

close out <head> tag

    <head>         <meta http-equiv="content-type" content="text/html; charset=us-ascii">    </head> 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -