+++ /dev/null
-# SMail
-
-`SMail the Mail of the future`
-
-**What pretends SMail?**
-
-SMail is a communication method, very different of the classic mail system.
-
-# Characteristics
-
-- Easy to use and install
-- Secure Mails and, you obligatory need a valid server to send mails, you not can send a message with a non-existing host.
-- Very new and multiplatform
-- Open Source
-- We have now 2 official instance
-- Its a best way for have security and we have compatibility with symbian and other systems
-
-# Donations
-
-[Programmer](https://liberapay.com/edkz)
-
-We need the donations because in my country the internet are very slow and limited
\ No newline at end of file
}
}
else{
- echo json_encode('{code: 400}');
+ header('Location: ../login.php');
}
?>
<?php
-$db_name='mail';
+$db_name='';
$db_user='';
$db_password='';
$db_link='';
color: white;
font-family: Bahnschrift;
}
+text{
+ font-size: 25px;
+}
a{
font-family: Bahnschrift;
color: yellowgreen;
text,h1,a,input,textarea{
font-size: 40px;
}
+}
+body{
+ padding: 20px;
}
\ No newline at end of file
+body{
+ padding: 1%;
+}
+h1{
+ padding: 0px;
+ margin: 0px;
+}
+.go{
+ float: right;
+ padding-right: 1%;
+}
+
+/** Mobile **/
+@media (orientation:portrait){
+ h1{
+ font-size: 20px;
+ }
+ .go{
+ float: none;
+ }
+ text{
+ font-size: 20px;
+ }
+ .mail text,a{
+ font-size: 20px;
+ }
+}
}
.center{
border-radius: 0px;
+}
+@media (orientation: portrait){
+ body{
+ padding-left: 10%;
+ padding-right: 10%;
+ }
+ text{
+ font-size: 20px;
+ }
+}
+@media (orientation: landscape){
+ body{
+ padding-left: 40%;
+ padding-right: 40%;
+ }
}
\ No newline at end of file
-<!-- {instance:Smail,version:0.3} --->
-<?php include 'i18n.class.php'; $i18n = new i18n(); $i18n->init(); include 'api/server_info.php';?>
+<!-- {instance:Smail,version:0.2} --->
+<?php include 'i18n.class.php'; $i18n = new i18n(); $i18n->init();?>
<html>
<head>
<title>SecureMail</title>
<link rel='stylesheet' type='text/css' href='css/index.css'>
- <link type='text/css' rel='stylesheet' href='css/all.css'/>
+ <link type='text/css' rel='stylesheet' href='css/all.css?v=1'/>
</head>
<body style='margin: 0px;'>
<div style='color: white; background: #30303c; padding: 1%;'>
- <h1 style='margin: 0px;'><?php echo L::index_welcome; echo " ". $instance_name;?></h1>
+ <h1 style='margin: 0px;'><?php echo L::index_welcome;?></h1>
<hr>
</div>
<div style='color: white; background: #30303c; padding: 1%;'>
[index]
-welcome = "Welcome to the instance"
+welcome = "SecureMail"
register = 'How i can create my own account?'
about = "What is SMail?"
how = "How i can use it?"
where = "Where i found the code?"
+bug = "I founded an error, where i can report it?"
license = "What's its the license of SMail"
register_c = "You can register your own account <a href='new_user.php'>here</a>"
about_c = "SMail is a web based mail, easy to install and use"
how_c = "You can login here <a href='login.php'>here</a> and if you now are login you can send messages <a href='send_m.php'>here</a> and see your mailbox <a href='mailbox/mailb.php'>here</a>"
where_c= "Project Code on <a href='https://reisub.nsupdate.info/git/?p=smail.git/.git;a=summary'>Git</a>"
+bug_c = "If you founded an error report it <a href='https://reisub.nsupdate.info/bugs/'>here</a>"
license_c = "SMail was Licensed by GPL V3, The complete name of the project is Secure Mail."
[login]
incorrect = "The_user_or_the_password_are_incorrect"
correct = "Loged succefully"
-postlogin_submit = "Sign in"
+submit = "Sign in"
[send]
content = "Content"
send = "Send"
[mbox]
dhave = "You dont have any message's"
-note = "<b>Note:</b> The horarie zone of this server are UTC 3"
-send = "Send a message"
+note = "<b>Note:</b> The horarie zone of this server are UTC-3"
+send = "New SMail"
change = "Change password"
or = "or"
-[gmail]
+[gmail] # Getmail not Google Mail
sender = "Sender"
content = "Contenido"
success = "Success"
return = "Return"
read = "Mark as read"
invalid_id = "Invalid ID"
-or = "or"
+or = "/"
[new]
already = "This user was already taken"
user = "User created, your new smail are "
+aroba = "User was not created because you put an @, you only need to put the user"
[reg]
-submit = "Sign up"
\ No newline at end of file
+submit = "Sign up"
+[errors]
+nonerror = "This SMail sended"
+iderror_not = "This SMail dont exists"
+sslerror = "A error as ocurred while sending message because the server was invalid or haves an bad ssl"
[index]
-welcome = "Bienvenido a la instancia"
+welcome = "SecureMail"
register = "¿Como me registro?"
about = "¿Que es SMail?"
how = "¿Como puedo usar SMail?"
where = "¿Donde puedo encontrar el codigo?"
+bug = "¿Encontre un error, donde lo reporto?"
license = "¿Cual es la licencia de SMail?"
register_c = "Puedes registrarte <a href='new_user.php'>aqui</a>"
about_c = "SMail es un protocolo de email basado en web, facil de instalar y usar"
how_c = "Puedes iniciar sesion <a href='login.php'>aqui</a> y si ya estas logeado puedes mandar mensajes <a href='send_m.php'>aqui</a> y ver tu mailbox <a href='mailbox/mailb.php'>aqui</a>"
where_c= "Codigo del proyecto en <a href='https://reisub.nsupdate.info/git/?p=smail.git/.git;a=summary'>Git</a>"
+bug_c = "Si has encontrado un error reportalo aqui, <a href='https://reisub.nsupdate.info/bugs/'>bugs</a>"
license_c = "SMail esta licenciado bajo GPL Version 3, el nombre completo del proyecto es Secure Mail"
[login]
incorrect = "El_usuario_o_la_contraseña_no_son_correctos"
correct = "Logeado correctamente"
-postlogin_submit = "Iniciar sesion"
+submit="Iniciar sesion"
[send]
content = "Contenido"
send = "Enviar"
[mbox]
dhave = "No tienes ningun mensaje"
-note = "<b>Nota:</b> La zona horaria de este servidor es UTC 3"
-send = "Mandar un mensaje"
+note = "<b>Nota:</b> La zona horaria de este servidor es UTC-3"
+send = "Nuevo SMail"
change = "Cambiar contraseña"
-or = "o"
-[gmail]
+or = "/"
+[gmail] # Getmail no gmail de google
sender = "Desde"
content = "Contenido"
success = "Finalizado Correctamente"
[new]
already = "Este usuario ya esta tomado"
user= "Usuario creado, tu nuevo smail es "
+aroba = "Usuario no creado porque pusiste una @, solo necesitas poner el usuario"
[reg]
-submit = "Registrar"
\ No newline at end of file
+submit = "Registrar"
+[errors]
+nonerror = "SMail enviado"
+iderror_not = "SMail no enviado porque el id no existe"
+sslerror = "SMail no enviado porque el servidor receptor no existe o no tiene ssl"
+++ /dev/null
-<html>
- <head>
- <title>Login Smail</title>
- <link type='text/css' rel='stylesheet' href='css/send.css?v=1'/>
- <link type='text/css' rel='stylesheet' href='css/all.css?v=2'/>
- <style type='text/css'>
- input{
- display: block;
- }
- </style>
- </head>
- <body>
- <form action='api/login.php' method='POST'>
- <input type="text" name="mail" id="mail" placeholder="Mail">
- <input type="password" name="password" class='center' id="" placeholder="Password">
- <input type="submit" value="Sign in" class='submit'>
- </form>
- </body>
-</html>
\ No newline at end of file
+<?php
+ini_set('display_errors',1);
+ini_set('display_initial_errors',1);
+error_reporting(E_ALL);?>
<?php include 'i18n.class.php'; $i18n = new i18n(); $i18n->init();?>
<html>
<head>
<title>Login Smail</title>
- <link type='text/css' rel='stylesheet' href='css/send.css?v=1'/>
- <link type='text/css' rel='stylesheet' href='css/all.css?v=2'/>
+ <!-----Alls------>
+ <link type='text/css' rel='stylesheet' href='css/all.css?v=4'/>
+ <!--Sends Pages-->
+ <link type='text/css' rel='stylesheet' href='css/send.css?v=2'/>
<style type='text/css'>
input{
display: block;
<form action='api/login.php' method='POST'>
<input type="text" name="mail" id="mail" placeholder="Mail">
<input type="password" name="password" class='center' id="" placeholder="Password">
- <input type="submit" value=<?php echo L::login_postlogin_submit;?> class='submit'>
+ <input type="submit" value=<?php echo L::login_submit;?> class='submit'>
</form>
</body>
-</html>
\ No newline at end of file
+</html>
print_r($i);
if (password_verify($_POST['old'],$i['mail_password'])){
$query=mysqli_query($conn,'UPDATE mail SET mail_password="'.password_hash($_POST['new'],PASSWORD_DEFAULT).'" where mail_user="'.$_SESSION['m_user'].'"');
- header('Location: ../login.html');
+ header('Location: ../login.php');
}
else{
- echo 'F';
- http_response_code(404);
+ header('Location: ../ch_p.php');
}
}
else{
- http_response_code(404);
+ header('Location: ../ch_p.php');
}
?>
\ No newline at end of file
}
else{
if ($log==0){
- header('Location: ../login.html');
+ header('Location: ../login.php');
}
else{}
}
\ No newline at end of file
<?php
+ini_set('display_errors',1);
+ini_set('display_initial_errors',1);
+error_reporting(E_ALL);
require '../api/functions.php';
session_issruning();
if (isloged()==0){
- header('Location: ../login.html');
+ header('Location: ../login.php');
die();
}
?>
<html>
<head>
<link type='text/css' rel='stylesheet' href='../css/all.css'/>
- <link type='text/css' rel='stylesheet' href='../css/mailbox.css'/>
+ <link type='text/css' rel='stylesheet' href='../css/mailbox.css?v=1'/>
</head>
<body>
<h1>Mail Box <?php if(isset($_GET['box'])==true){echo $_GET['box'];}?></h1>
foreach ($dirs as $i){
$date='';
include preg_split('/@/',$_SESSION['m_user'])[0].'/mails/'.$i;
- echo '<span class="mail"><a href="getmail.php?box='.$_GET['box'].'&id='.$i.'">'.$sender.'</a> <text>'.$date.'</text> <a href="getmail.php?delthem='.$i.'">Delete</a></span><br>
+ echo '<span class="mail"><a href="getmail.php?box='.$_GET['box'].'&id='.$i.'">'.$sender.'</a> <text>'.str_replace('-','/',$date).'</text> <a href="getmail.php?delthem='.$i.'">Delete</a></span><br>
';
}
}
foreach ($dirs as $i){
$date='';
include preg_split('/@/',$_SESSION['m_user'])[0].'/mails/'.$i;
- echo '<span class="mail"><a href="getmail.php?id='.$i.'">'.$sender.'</a> <text>'.$date.'</text> <a href="getmail.php?delthem='.$i.'">Delete</a></span><br>
+ echo '<span class="mail"><a href="getmail.php?id='.$i.'">'.$sender.'</a> <div class="go"><text>'.str_replace('-','/',$date).'</text> <a href="getmail.php?delthem='.$i.'">Delete</a></div></span><br>
';
}
}
}
}
else{
- header('Location: ../login.html');
+ header('Location: ../login.php');
}
\ No newline at end of file
<?php include '../i18n.class.php'; $i18n = new i18n('../lang/lang_{LANGUAGE}.ini'); $i18n->init();?>
<?php
+ini_set('display_errors',1);
+ini_set('display_initial_errors',1);
+error_reporting(E_ALL);
include '../api/server_info.php';
-if (isset($_POST['mail']) and isset($_POST['password'])){
+if (strpos('@',$_POST['mail'])){
+ header('../new_user.php?info='.L::new_aroba);
+}
+elseif (isset($_POST['mail']) and isset($_POST['password'])){
$conn=mysqli_connect($db_link,$db_user,$db_password,$db_name);
$selfUrl=$_SERVER['HTTP_HOST'].preg_replace('/mailbox\/new_user.php/','',$_SERVER['PHP_SELF']);
$query=mysqli_query($conn,'SELECT mail_user FROM mail WHERE mail_user="'.$_POST['mail'].'@'.$selfUrl.'"');
print_r($query);
if (mysqli_connect_error()){
http_response_code(500);
+ header('Location: new_user.php?info=<text>DB_error</text>');
}
elseif (mysqli_num_rows($query)==0){
mkdir($_POST['mail']);
mkdir($_POST['mail'].'/mails');
mkdir($_POST['mail'].'/readed');
+ touch($_POST['mail'].'/index.php');
$query=mysqli_query($conn,'INSERT INTO mail(mail_user,mail_password) VALUES("'.$_POST['mail']."@".$selfUrl.'","'.password_hash($_POST['password'],PASSWORD_DEFAULT).'")');
header('Location: ../login.php?info=<text>'.L::new_user.' '.$_POST['mail'].'@'.$selfUrl.'</text>');
}
else{
header('Location: ../index.php');
}
-?>
\ No newline at end of file
+?>
}
}
else{
- header('Location: ../login.html');
+ header('Location: ../login.php');
}
?>
\ No newline at end of file
$other=array(
CURLOPT_URL => 'https://'.preg_split('/@/',$_POST['mail'])[1].'/mailbox/user.php',
CURLOPT_POST => true,
+ CURLOPT_SSLCERT => '',
CURLOPT_POSTFIELDS => $mail,
CURLOPT_RETURNTRANSFER => true
);
echo $info;
if ($info==200){
if (file_exists($_POST['to'].'/index.php')){
- $date=date('Y-m-d H:i:s');
+ $date=date('d/m/Y H:i:s');
$content='<?php
-$html="'.'<!version=0.1>'.str_replace("'",'"',$_POST['html']).'";
+$html="'.'<!version=0.1>'.str_replace('"',"'",$_POST['html']).'";
$sender="'.$_POST['mail'].'";
$date="'.$date.'";
?>';
}
else{
if ($log==0){
- header('Location: ../login.html');
+ header('Location: ../login.php');
}
else{}
}
\ No newline at end of file
<?php
+ini_set('display_errors',1);
+ini_set('display_initial_errors',1);
+error_reporting(E_ALL);
+include '../i18n.class.php'; $i18n = new i18n('../lang/lang_{LANGUAGE}.ini'); $i18n->init();
+?>
+<?php
include '../api/functions.php';
if (isset($_POST['content']) and isset($_POST['mail_r'])){
session_issruning();
$out=curl_exec($curl);
echo curl_error($curl);
if (curl_error($curl)){
- echo json_encode('{end: 400}');
+ header('Location: mailb.php?info=<text>'.L::errors_sslerror.'</text> '.curl_error($curl));
}
else{
$info=curl_getinfo($curl,CURLINFO_HTTP_CODE);
- echo $info;
if ($info==200){
- echo json_encode('{code:200, detail=mail sended}');
+ header('Location: mailb.php?info=<text>'.L::errors_nonerror.'</text>');
}
else{
- echo json_encode('{code:404, detail=error}');
+ header('Location: mailb.php?info=<text>'.L::errors_iderror_not.'</text>');
}
}
}
$out=curl_exec($curl);
echo curl_error($curl);
if (curl_error($curl)){
- echo json_encode('{end: 400}');
+ header('Location: mailb.php?info=<text>'.L::errors_sslerror.'</text>');
}
else{
- echo $out;
$info=curl_getinfo($curl,CURLINFO_HTTP_CODE);
- echo $info;
- echo $out;
if ($info==200){
- echo json_encode('{code:200, detail=mail sended}');
+ header('Location: mailb.php?info=<text>'.L::errors_nonerror.'</text>');
}
else{
- echo json_encode('{code:404, detail=error}');
+ header('Location: mailb.php?info=<text>'.L::errors_iderror_not.'</text>');
}
}
}
}
else{
- echo json_encode('{code:500, detail=unknow login}');
+ header('Location: ../login.php');
}
}
<?php include 'i18n.class.php'; $i18n = new i18n(); $i18n->init();?>
-<?php include 'api/server_info.php';
-$conn=mysqli_connect($db_link,$db_user,$db_password,$db_name);
-$query=mysqli_query($conn,"CREATE TABLE mail(mail_user,mail_password)");?>
<html>
<head>
<title>Register Smail</title>