473,586 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Background images don't show up in Emails

29 New Member
Hi all,

I have a problem with sending emails. If i use this,

Expand|Select|Wrap|Line Numbers
  1. <img src=\"http://www.vipventa.com/imgs/logovn.gif\">
  2.  
This work fine in the emails.

but why this dont work?
Expand|Select|Wrap|Line Numbers
  1. <th height=\"170\" scope=\"col\" background=\"http://www.vipventa.com/imgs/fondoCabeza.gif\">
  2.  
I post me code.

Expand|Select|Wrap|Line Numbers
  1.  
  2.         $asunto="Nuevo password vipventa.com";
  3.         $cabeceras  = "MIME-Version: 1.0\n";
  4.         $cabeceras .= "From: consultas@vipventa.com\r\nContent-type: text/html; charset=iso-8859-1\n"; 
  5.         $codigohtml="<html>
  6. <head>
  7. <title>Nuevo Password Vipventa.com</title>
  8. <style type=\"text/css\">
  9. <!--
  10. body {
  11.     background-color: #000000;
  12.  
  13. }
  14. .txtwhitebold {
  15.     font-family: \"Arial\";
  16.     font-size: 12px;
  17.     font-style: normal;
  18.     line-height: 12px;
  19.     font-weight: bold;
  20.     font-variant: normal;
  21.     text-transform: none;
  22.     color: #999999;
  23.     letter-spacing: 0.02em;
  24.     text-decoration: none;
  25. }
  26. .titleportada {
  27.     font-family: \"Georgia\";
  28.     font-size: 16px;
  29.     font-style: normal;
  30.     line-height: 12px;
  31.     font-weight: bold;
  32.     font-variant: normal;
  33.     text-transform: none;
  34.     color: #FFFFFF;
  35.     letter-spacing: 0.02em;
  36.     text-decoration: none;
  37. }
  38. .linx {
  39.     font-family: \"Arial\";
  40.     font-size: 10px;
  41.  
  42.     line-height: normal;
  43.     font-weight: normal;
  44.     font-variant: normal;
  45.     text-transform: none;
  46.     text-decoration: none;
  47.     color: #333333;
  48.     letter-spacing: 0.02em;
  49.     word-spacing: 0em;
  50. }
  51. -->
  52. </style>
  53. </head>
  54.  
  55.  
  56. <body>    
  57. <table width=\"527\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  58.   <tr>
  59.     <th height=\"170\" scope=\"col\" background=\"http://www.vipventa.com/imgs/fondoCabeza.gif\">
  60. <table width=\"494\" height=\"160\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  61.       <tr>
  62.         <th width=\"10\" scope=\"col\">&nbsp;</th>
  63.         <th width=\"458\" scope=\"col\">&nbsp;</th>
  64.         <th width=\"10\" scope=\"col\">&nbsp;</th>
  65.       </tr>
  66.       <tr>
  67.         <td height=\"35\">&nbsp;</td>
  68.         <td>&nbsp;</td>
  69.         <td>&nbsp;</td>
  70.       </tr>
  71.       <tr>
  72.         <td height=\"70\">&nbsp;</td>
  73.         <td><p>&nbsp;</p>
  74.           <p align=\"center\">sdfsdf</p></td>
  75.         <td>&nbsp;</td>
  76.       </tr>
  77.     </table></th>
  78.   </tr>
  79.   <tr>
  80.     <td height=\"229\" background=\"http://www.vipventa.com/imgsfondocuerpo.gif\">     
  81.  
  82.     <table width=\"494\" height=\"160\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  83.       <tr>
  84.         <th width=\"10\" scope=\"col\">&nbsp;</th>
  85.         <th width=\"458\" rowspan=\"3\" scope=\"col\">sdfsdf</th>
  86.         <th width=\"10\" scope=\"col\">&nbsp;</th>
  87.       </tr>
  88.       <tr>
  89.         <td height=\"35\">&nbsp;</td>
  90.         <td>&nbsp;</td>
  91.       </tr>
  92.       <tr>
  93.         <td height=\"70\">&nbsp;</td>
  94.         <td>&nbsp;</td>
  95.       </tr>
  96.     </table>
  97.  
  98.     </td>
  99.   </tr>
  100.   <tr>
  101.     <td height=\"192\" background=\"http://www.vipventa.com/imgs/fondopie.gif\"><table width=\"494\" height=\"160\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  102.       <tr>
  103.         <th width=\"10\" scope=\"col\">&nbsp;</th>
  104.         <th width=\"458\" rowspan=\"3\" scope=\"col\">sdfsfsdfsdf</th>
  105.         <th width=\"10\" scope=\"col\">&nbsp;</th>
  106.       </tr>
  107.       <tr>
  108.         <td height=\"35\">&nbsp;</td>
  109.         <td>&nbsp;</td>
  110.       </tr>
  111.       <tr>
  112.         <td height=\"70\">&nbsp;</td>
  113.         <td>&nbsp;</td>
  114.       </tr>
  115.     </table></td>
  116.   </tr>
  117. </table>
  118. </body>
  119.  
  120. </html>";
  121.  
  122.         mail($usuario,$asunto,$codigohtml,$cabeceras);
  123.  
  124.  
Jun 16 '07 #1
11 4850
pbmods
5,821 Recognized Expert Expert
Changed thread title to better describe the problem (did you know that threads with the word 'problem' in their title actually get FEWER responses?).

Heya, TomasART.

Try using 'style=\"backgr ound:url('...') ;\"' instead of 'background=\". ..\"'.

pbmods
Jun 17 '07 #2
TomasART
29 New Member
Changed thread title to better describe the problem (did you know that threads with the word 'problem' in their title actually get FEWER responses?).

Heya, TomasART.

Try using 'style=\"backgr ound:url('...') ;\"' instead of 'background=\". ..\"'.

pbmods
I'am sorry. My inglish is very bad. I do undestand all but i'am not able to express me good.

Thanks for your help. Very very thanks.
Jun 18 '07 #3
TomasART
29 New Member
Changed thread title to better describe the problem (did you know that threads with the word 'problem' in their title actually get FEWER responses?).

Heya, TomasART.

Try using 'style=\"backgr ound:url('...') ;\"' instead of 'background=\". ..\"'.

pbmods

Do the same. Don't work. Don't error. Do nothing.

Expand|Select|Wrap|Line Numbers
  1. <td height=\"192\" 'style=\"background:url('http://www.vipventa.com/imgs/fondopie.gif');\"'><table width=\"494\" height=\"160\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
  2.  
Jun 18 '07 #4
ak1dnar
1,584 Recognized Expert Top Contributor
Try these headers instead of yours.

[PHP] $cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras .= 'From: consultas@vipve nta.com' . "\r\n";
$cabeceras .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
[/PHP]
Jun 18 '07 #5
TomasART
29 New Member
Try these headers instead of yours.

[PHP] $cabeceras = 'MIME-Version: 1.0' . "\r\n";
$cabeceras .= 'From: consultas@vipve nta.com' . "\r\n";
$cabeceras .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
[/PHP]
If i use this header, i recive the html code as text in the email.
Jun 18 '07 #6
ak1dnar
1,584 Recognized Expert Top Contributor
If i use this header, i recive the html code as text in the email.
Hi TomasART,
Sorry I didn't get you properly.
does it works or still having the problem?
Jun 18 '07 #7
TomasART
29 New Member
Hi TomasART,
Sorry I didn't get you properly.
does it works or still having the problem?
NO, don't work.

Thanks :(
Jun 18 '07 #8
ak1dnar
1,584 Recognized Expert Top Contributor
Avoid passing other <HTML> codes like CSS.Just insert your <table> to the mail body
[PHP]
$body = '
<table width="519" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#A A0022">
<tr>
<th height="19" colspan="4" bordercolor="#5 58DD8" bgcolor="#13218 C" scope="row" background="URL _FOR_THE_IMAGE" >th>
</tr>
</table> ';
[/PHP]
and send the body with other parameters.

[PHP]

$to = 'tomail@domain. com';
$subject = "Contact us";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "Reply-to: replymail@domai n.com\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: FROM NAME <info@domain.co m>' . "\r\n";

$result = @mail($to, $subject, $body, $headers);
if($result)
{
header('Locatio n: thanks.html');
}else
{
header('Locatio n: failure.html');
}
[/PHP]
Jun 18 '07 #9
TomasART
29 New Member
Avoid passing other <HTML> codes like CSS.Just insert your <table> to the mail body
[PHP]
$body = '
<table width="519" border="0" align="left" cellpadding="0" cellspacing="0" bordercolor="#A A0022">
<tr>
<th height="19" colspan="4" bordercolor="#5 58DD8" bgcolor="#13218 C" scope="row" background="URL _FOR_THE_IMAGE" >th>
</tr>
</table> ';
[/PHP]
and send the body with other parameters.

[PHP]

$to = 'tomail@domain. com';
$subject = "Contact us";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= "Reply-to: replymail@domai n.com\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: FROM NAME <info@domain.co m>' . "\r\n";

$result = @mail($to, $subject, $body, $headers);
if($result)
{
header('Locatio n: thanks.html');
}else
{
header('Locatio n: failure.html');
}
[/PHP]

Thanks for your time. I will try it.
Jun 18 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
10467
by: Markus Mohr | last post by:
Hi, everyone, I have a special problem: For every monitor resolution in 200 pixel steps from 800 to 1600 pixels I have an image to be shown as centered background-image. Those images all have the same name and reside in the following physical path structure:
23
7709
by: Erik Schulp | last post by:
Hi all, I am using a background image via a stylsheet. I've used this code: background-image:url("/images/tile.gif"); (which I think is correct) The image doesn't show up however, the path, the filename etc etc, everything checks out ok.
3
2034
by: ribinha | last post by:
Hi all, I am having problems loading background images on my pages. I have created a css to display the images. It works just fine on my test box, but when I tried on real pages it wont upload any images everythin else displays just fine. I used a table and added a background image to every row. when i call the page it shows that it is...
8
1983
by: johkar | last post by:
I have two problems I cannot work out in the following tab code with Netscape 6. Problems are marked with all cap comments. One is that the background image is not shown in NS 6 (two places in CSS). The second problem is that the top right rounded corner is not showing up in the Tier 2 tabs. Could you have a look and tell me if it is...
0
2071
by: Jeb Hunter | last post by:
Well, how can I describe this succinctly? I have a page with DIVs that us background images to produce a border effect. It works perfectly well, but I want to make up (for now) 3 different border/background effects. Rather than duplicate the entire chunk of CSS 3 times, I thought "Gee, I should only have to specify the 3 backgrounds (all...
5
3160
by: Michael | last post by:
Is there a way to specify a background-image for a html table cell in a theme's css file. I know a lot of things I can't do... can't figure out one that I can do: 1) ~/ Images/logo.gif doesn't work since it isn't a server side control. 2) /Images/logo.gif doesn't work, not sure why. 3) Images/logo.gif doesn't work - This can work...
1
1039
by: tshad | last post by:
I have some emails I am sending from my .aspx pages. These pages are .htm pages that work fine in outlook and show all my images correctly. But from my dslextreme and yahoo accounts they don't. I have a "base href" statement in my page, but for some reason Yahoo and Dslextreme is deleting it. How do I get them to keep this line? I don't...
6
7224
by: Rob | last post by:
Hello, I'm sure this has come up before. I have need for a collection of all elements/objects in an HTML document that have any kind of an attribute (HTML or CSS) that is making use of a URL to display an image. document.images only seems to reference image tags. The collection needs to include background images, input type = image,...
1
1584
by: tlonthedl | last post by:
Hi, I am designing a theme for a wordpress blog and I am having some problems with repeating background images. Specifically, the background image will not show or repeat in the body, or in the sidebar. I realize this could be a php problem but I wanted to check and make sure it wasn't a css issue first. The repeating image will work in the...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.