Problemer med Æ,Ø og Å
hejsa.Har fundet et nyhedsmail system, spm jeg godt kunne bruge.
Men når jeg modtager mailen fra systemet på min pc kan den ikke skrive æ,ø eller å, men det virker ok hvis modtager mailen på en Iphone eller en Ipad.
Håber der er nogen der kan hjælpe med det problem.
Filerne ser sådan ud
___________________________________________________________
sendmaillist.php:
_____________
<?php
/*
NewsLetter Script - Version 2.0
Copyright (c)2016, http://nedfile.nl
This NewsLetter script was created/adapted by Admin / NedFile.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the nedfile.nl nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL NEDFILE.NL BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
# Protect the form -> choose a password
$my_password = "pass";
$from_email = "NewsLetter <XXXXXXXX>";
$replayto = "noreply@mail.com";
$mailbottom = "
-----------------------------------------------------------------------------------
To remove youself from this list go to: http://subscribe/subscribe.php
";
# The file where emails are stored
$emails_file = "emaillist.txt";
if (isset($_POST['mailall'])){
$subject = $_POST["subject"];
$message = $_POST["messa"];
if ($_POST["pass"] !== $my_password) $error = "Password is not oke";
if($message == '') $error = "Message is empty";
if($subject == '') $error = "Subject is empty";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>NewsLetter</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<div class="top" align="center">
<div align="left" style="width:700px; font-size:14px; color:#FFFFFF"><b>Subscribe NewsLetter Script V2.0</b></div>
</div>
<div align="center" style="padding-top:80px;">
<div class="cover" align="center">
<font style="color:#009999; font-size:18px">Form to send a Message to the Newsletter subscribers.</font><br />
<font color="#4F4F4F" size="2" face="Verdana">Send here your news message to all the subscribers</font>
<div style="padding-left:100px">
<?php
if($error == ''){
if ($_POST["pass"] == $my_password){
$message.= $mailbottom;
// Read the file with emails
$emails_file = file_get_contents($emails_file);
// Extract list of emails
preg_match_all("/<.{0,100}?>/",$emails_file,$emails_array);
// Start output
ob_implicit_flush(true);
// Send email to each email
foreach ($emails_array[0] as $email){
// remove "<" and ">" from each email
$email = substr($email,1,strlen($email)-2);
// Next line is the one sending the email: the key command of this script
mail($email, $subject, $message,"From: $from_email\nReply-To: $replayto\nContent-Type: text/plain");
// Each time an email is send, output it
$ret[] = "<br>$email";
// After sending each email, send previous line (the email) to the browser
echo "$email<br>";
for($k = 0; $k < 40000; $k++) echo ' ';
usleep(500000); // Don't bombard mail server, wait 0.5 sec between sending.
}
echo "<br><b>Message sending complete!</b>";
}
}
?>
</div>
<?php
if($error){
?>
<script type="text/javascript">
// close the errordiv in secs
window.setTimeout("close();", 4000);
function close(){
document.getElementById("errordiv").style.display="none";
}
</script>
<?php
}
?>
<div>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" >
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80"></td>
<td><div style="height:24px;"><div id="errordiv" style="display:block; color:#FF3535"><b><?php if($error) echo $error; ?></b></div> </div></td>
</tr>
<tr>
<td valign="top"width="80">Subject:
</td>
<td><input name="subject" size="30" type="text" value="<?=$subject?>"><br />
</td>
</tr>
<tr>
<td valign="top">Message:</td>
<td><textarea name="messa" cols="50" rows="8"><?=$message?></textarea><br />
</td>
</tr>
<tr>
<td width="80">Password:</td>
<td><input type="password" name="pass" size="10"></td>
</tr>
<tr>
<td width="80"></td>
<td><br />
<br />
<input type="submit" class="button" value="Send email to all" name="mailall"></td>
</tr>
</table>
</form>
</div>
</div>
</div>
<div class="cleaner"></div>
</body>
</html>
___________________________________________________________
subscribe:
_________
<?php
/*
NewsLetter Script - Version 2.0
Copyright (c)2016, http://nedfile.nl
This NewsLetter script was created/adapted by Admin / NedFile.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the nedfile.nl nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL NEDFILE.NL BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
if (isset($_POST['listmail'])){
// GET EMAIL
$email = $_POST["email"];
$email = strtolower($email);
if($email == '') $error = "Email is empty";
if($error == ''){
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$error = "Invalid email format";
}
}
$action = $_POST["action"];
$file = "emaillist.txt";
if($error == ''){
if (file_exists($file)){
// If the file is already in the server
$file_content = file_get_contents($file);
}else{
$cf = fopen($file, "w") or die("Error: file does not exits");
//fputs($cf, "Mailing list subscribers\n");
fclose($cf);
}
}
// IF REQUEST -> ADD EMAIL TO THE FILE
if($error == ''){
if ($action == "subc"){
// check whether the email is already registered
if(strpos($file_content,"<$email>") > 0) $error = "Your email is already included in the mailing list.";
if($error == ''){
// write the email to the list
$cf = fopen($file, "a");
fputs($cf, "\n<$email>");
fclose($cf);
// notify subscription
$error = "Your email has been added to the mailing list.";
}
}
}
// IF REQUEST HAS BEEN TO UNSUBSCRIBE FROM MAILING LIST, REMOVE EMAIL FROM THE FILE
if($error == ''){
if ($action == "unsubc"){
// if email is not in the list, display error
if(strpos($file_content,"<$email>")==0) $error = "Your email is not included in the mailing list.";
if($error == ''){
// remove email from the content of the file
$file_content=preg_replace ("/\n<$email>/","",$file_content);
// print the new content to the file
$cf = fopen($file, "w");
fputs($cf, $file_content);
fclose($cf);
// notify unsubscription
$error = "Your email has been removed from the mailing list.";
}
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>NewsLetter</title>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body>
<div class="top" align="center"><div align="left" style="width:700px; font-size:14px; color:#FFFFFF"><b>Subscribe NewsLetter Script V2.0</b></div></div>
<div align="center" style="padding-top:80px;">
<div class="cover" align="center">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<font style="color:#009999; font-size:18px">Subscribe to Newsletter script V2.0</font>
</td>
</tr>
<tr>
<td valign="top" style="padding-top:5px;"><font color="#4F4F4F" size="2" face="Verdana">
If you would like to stay updated about the latest updates, scripts and patches subscribe<br />
to the newsletter.<br /><br />
</font></td>
</tr>
</table>
<?php
if($error){
?>
<script type="text/javascript">
// close the errordiv in secs
window.setTimeout("close();", 4000);
function close(){
document.getElementById("errordiv").style.display="none";
}
</script>
<?php
}
?>
<div align="center" style="padding-top:30px;">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80"></td>
<td><div style="height:24px;"><div id="errordiv" style="display:block; color:#FF3535"><b><?php if($error) echo $error; ?></b></div> </div></td>
</tr>
<tr>
<td width="80">your Email:</td>
<td><input name="email" size="30" type="text"></td>
</tr>
<tr>
<td></td>
<td><br />
<input name="action" value="subc" checked="checked" type="radio"> Subscribe
<input name="action" value="unsubc" selected="" type="radio"> Unsubscribe</td>
</tr>
<tr>
<td> </td>
<td><br /><br /><input class="button" value="Submit" type="submit" name="listmail"></td>
</tr>
</table>
</form>
</div>
</div>
</div>
<div class="cleaner"></div>
</body>
</html>
__________________________________________________________
Htaccess:
_________
RewriteEngine on
#show an alternate image
RewriteRule \.(txt)$ http://google.com [NC,R,L]
___________________________________________________________
style:
______
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color: #404040;
background-color:#F3F3F3;
margin: 0;
}
.top{
width:100%;
height:30px;
line-height:30px;
position: absolute;
top:0;
background-color:#706470;
}
.cover{
background-color:#F7F7F7;
width:600px;
padding:10px 30px 40px 30px;
border:solid 1px #CCCCCC
}
.button {
background-color: #ddd;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ddd));
background-image: -webkit-linear-gradient(top, #fff, #ddd);
background-image: -moz-linear-gradient(top, #fff, #ddd);
background-image: -ms-linear-gradient(top, #fff, #ddd);
background-image: -o-linear-gradient(top, #fff, #ddd);
background-image: linear-gradient(top, #fff, #ddd);
-moz-box-shadow: 0 0 1px 1px rgba(255,255,255,.8) inset, 0 1px 0 rgba(0,0,0,.3);
-webkit-box-shadow: 0 0 1px 1px rgba(255,255,255,.8) inset, 0 1px 0 rgba(0,0,0,.3);
box-shadow: 0 0 1px 1px rgba(255,255,255,.8) inset, 0 1px 0 rgba(0,0,0,.3);
background-color:#f9f9f9;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
border:1px solid #777777;
display:inline-block;
cursor:pointer;
color:#333333;
font-family:Arial;
font-size:12px;
padding:3px 8px;
text-decoration:none;
}
.button:hover {
background-color: #eee;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#e8e8e8));
background-image: -webkit-linear-gradient(top, #fafafa, #e8e8e8);
background-image: -moz-linear-gradient(top, #fafafa, #e8e8e8);
background-image: -ms-linear-gradient(top, #fafafa, #e8e8e8);
background-image: -o-linear-gradient(top, #fafafa, #e8e8e8);
background-image: linear-gradient(top, #fafafa, #e8e8e8);
}