Jump to content

Sending mail


Tasos

Recommended Posts

Hello i have a question, about how to fix this.

 

I made this and i want to send it in mail but  design is not showing up. this is how i want and what i receive.

 

 

13.jpg

 

Here below the script i use.

<?
include("config.php");

if(is_array($_POST['emails'])) {
	$subject = "Food Deal";
	
	$photoExt = explode('.',$_FILES['file']['name']);
	$fname=time()."_".mt_rand(1,1000).".".end($photoExt);
	$imageUrl = "upload_images/$fname";
	move_uploaded_file($_FILES['file']['tmp_name'],$imageUrl);
	
	$message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
#wrapper{
	width:600px;
	height:800px;
	border:2px solid #CCC;
	background-color:#efefef;
	
	
}
.header{
	width:100%;
	height:150px;
	
	
	float:left;
}
.headr img{
	width:570px;
	height:75;
}
.header-2{
	width:570px;
	height:25px;
    margin-left:15px;
	margin-bottom:10px;
	margin-bottom:20px;
	float:left;
}
.wrap-image{
	width:100%;
	height:300px;
	float:left;
	margin-bottom:20px;
	
}
.wrap-image img{
	width:100%;
	height:300px;
	float:left;
}

#info{
	width:100%;
	height:260px;
	float:left;
	border-bottom:1px solid #282828;
}
#info .text{
	height:200px;
	width:340px;
	float:left;
	margin-left:15px;
	
	
	
}
#info .right{
	height:240px;
	width:205px;
	float:left;
	margin-left:5px;
	text-align:center;
	background-color:#fff;
	padding:10px;
	
}
#info .date{
	width:100%;
	height:40px;
	float:left;
	margin-bottom:5px;
	font-size:25px;
	padding-top:10px;
	background-color:#efefef;
	font:"Times New Roman", Times, serif;
}
#info .day{
	width:100%;
	height:100px;
	float:left;
	margin-bottom:10px;
	font-size:90px;
	font-weight:bold;
}
#info .space{
	height:25px;
	width:100%;
	float:left;
}
#info .to-website{
	width:100%;
	height:50px;
	float:left;
	font-size:20px;
	padding-top:4px;
	
}
#info a:link{
	text-decoration:none;
	color:#fff;
}
#info a:visited{
	color:#FFF;
}

#info .navigation {
border: none;
padding: 9.6px 19.2px;
background: #c0392b;
color: #fff;

font-size: 16px;
letter-spacing: 1px;
text-transform: uppercase;
cursor: pointer;
display: inline-block;
margin: 3px 2px;
border-radius: 2px;
}
#info .navigation:hover{
	background: #A5281B;
	
}
#title{
	width:565px;
	height:25px;
	margin-bottom:10px;
	float:left;
	margin-left:10px;
	font-size:24px;
	background-color:#fff;
	padding:5px;
	border-bottom:#c0c0c0 solid 1px;
	-webkit-box-shadow: 0px 0px 27px rgba(50, 50, 50, 0.75);
-moz-box-shadow:    0px 0px 27px rgba(50, 50, 50, 0.75);
box-shadow:         0px 0px 27px rgba(50, 50, 50, 0.75);
	
}
#title .in{
	background-color:#efefef;
	width:400px;
	height:30px;
	float:left;
	padding-left:25px;
}

</style>
</head>

<body>

<div id="wrapper">
<div class="header">
<img src="img/mail-photo.jpg" width="100%" height="150" />
</div>


<div class="wrap-image">
<a href="'.$_POST['url'].'"><img src="'.$site_url.$imageUrl.'"></a>
</div>
<div id="title"><div class="in">'.$_POST['title'].' - '.$_POST['valid'].'</div></div>
<div id="info">
<div class="text">
'.$_POST['desc'].'

</div>
<div class="right">
<div class="date">juli 2013</div>
<div class="day">4</div>

<div class="to-website">
<div class="navigation"><a href="http://www.google.com">Reserveren</a></div>
<a href="'.$_POST['url'].'">
<div style="width:100%; height:20px; font-size:14px; background-color:#c0392b; padding:2px;">
Of ga naar website</a>
</div>
</div>

</div>
</div>


<div style="float:left;">All rights reserved © one-webmedia.nl</div>

</div>';
	
	$headers  = 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	$headers .= "From: $from_email\r\n"."X-Mailer: php";
	foreach($_POST['emails'] as $email) {
	mail($email,$subject,$message,$headers);
	}
	
	header("location: ?send_message=1");
	exit;
	
}
?>


</body>
</html>

What am doing wrong here ? 

 

Thank.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.