← Desenvolvimento

Mail code by kingless

Lida 9944 vezes

Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Este foi o meu primeiro script , criei a umas 2 semanas atras..

Código: [Seleccione]

<?
$enviar = $_REQUEST['enviar'];
$assunto = $_REQUEST['assunto'];
$send = $_REQUEST['send'];
$msg = $_REQUEST['msg'];
$de = $_REQUEST['de'];
$mbox = $_REQUEST['mbox'];
$err = "Não Foi Possivel Enviar O Email!!";
$criado = "Script Criado Por";
$cor = "CCCCCC"; $aut = "less"; $letras = "black";
$body = "<body bgcolor=$cor>"; $aut1 = "king";
if(isset($mbox) and $mbox == "2") {
$cor = "003399"; $letras = "CCCCCC"; }
$autor = "$criado"." $aut1"."$aut";
$cmail = "<b>Como Enviar Email:</b> ".$PHP_SELF."?enviar=<font color=blue>teu-amigo@email.com</font>&assunto=<font color=red>o assunto do email</font>&msg=<font color=blue>Mensagem que queres enviar</font>&de=<font color=red>teu-email@email.com</font>&send=<font color=blue>sim</font></font>"; $aut1 = "king";
if($mbox == "1" or $mbox == "2") {
$autor = "$criado"." $aut1"."$aut";
if(isset($aut) and $aut1 == "king") {
echo "<body bgcolor=$cor><font color=$letras><b>[MailBox]</b><br><br><form method=REQUEST action=$PHP_SELF><b>De: <b><input type=text name=de><br><b>Para:</b><input type=text name=enviar><br><b>Assunto: </b><input type=text name=assunto><br><br><b>Msg:</b><br><textarea name=msg cols=35 rows=8>Mensagem Aqui</textarea><br><button width=7 height=7 type=submit name=send value=yes>Enviar Email!</button></form><br><br><br><br><b><center><font size=1 color=$letras>$autor</font></center></font></b>"; exit(0);
}elseif(isset($aut1) and $aut != "less") { echo "Arquivo Danificado!!"; } }elseif(isset($mbox) and $mbox != "1") { echo "$body"."Escolhe uma MailBox!!<br><br><form action=$PHP_SELF><select type=submit name=mbox><option value=1>1<option value=2>2</select><input type=submit value=Enviar></form>"; exit(0);
}echo "$body";
if(!$_REQUEST['enviar']){
echo("$err<br><br>".$cmail."\n");
}elseif(!$_REQUEST['de']){
echo("$err<br><br>".$cmail."\n");
}elseif(!$_REQUEST['msg']){
echo("$err Está a faltar a mensagem!!<br><br>".$cmail."\n");
}elseif(!$_REQUEST['assunto']){
echo("$err Está a faltar o assunto!!<br><br>".$cmail."\n");
}elseif($_REQUEST['send'] == "nao" or $_REQUEST['send'] == "no") {
echo("O email não será enviado!!");
} elseif($_REQUEST['send'] == "sim" or $_REQUEST['send'] == "yes") {
mail("$enviar",
"$assunto",
"$msg\n",
"From: $de\nReply-To: $de");
if(isset($aut1) and $aut == "less") {
echo "O email foi enviado com sucesso!!<br><br><b>De:</b> $de<br><b>Para:</b> $enviar <br><b>Assunto:</b> $assunto<br><br><b>Msg:</b><br><textarea  name=msg cols=35 rows=8 readonly style=background-color:#CCCCCC;>$msg</textarea><br><br><br><br><br><font size=2>".$cmail."</font></font><br><br><br><center><b><font size=1 color=$letras>$autor</center></font></b>";
 } elseif(isset($aut) and $aut1 != "king") {
echo "Arquivo Danificado!!";
 }
} else {
echo("Não Foi Possivel Enviar o Email!!");
}
?>


É so um codigo para animar o forum!! lool
Offline

asturmas 
Administrador
Mensagens 19734 Gostos 50
Feedback +2

Troféus totais: 39
Trófeus: (Ver todos)
Mobile User Windows User Super Combination Combination Topic Starter 100 Poll Votes 50 Poll Votes 10 Poll Votes Poll Voter Poll Starter

Publica isso no aloja  :lol:
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Lol,,,,
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Devia era ter um formulário, mas está bom! :D
Offline

+speed 
Membro
Mensagens 544 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

offtopic: alguem tem um code para recomendações?
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Citação de: "+speed"
offtopic: alguem tem um code para recomendações?


Que tipo de recomendações? Simples ou convites para todos os contactos do MSN, Google e Yahoo? O cenourinha fez um.. :)
Offline

+speed 
Membro
Mensagens 544 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

pelo que vi dos contacto msn é a pagantes certo, bom era fixe ambos para msn.. e mail :)
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Citação de: "+speed"
pelo que vi dos contacto msn é a pagantes certo, bom era fixe ambos para msn.. e mail :)


Não..a pessoa introduz o seu e-mail hotmail, google ou yahoo e a sua password e depois é enviado um convite para todos os contactos GRATUITAMENTE lol
Offline

+speed 
Membro
Mensagens 544 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

ñ era o code disso andou ai um topico que era pago o script hehe, o cenorinha arrnja isso? dava geito os contactos e para o mail normal :)
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Está aqui no + Tráfego um tópico com isso..procura aqui na área de webmasters :)
Offline

cenourinha 
Elite
Mensagens 4094 Gostos 21
Troféus totais: 34
Trófeus: (Ver todos)
Mobile User Apple User Level 6 Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4

Offline

+speed 
Membro
Mensagens 544 Gostos 0
Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

ñ axei o script :( tá bem fixe a page =D&gt;
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

Aquilo é o script que te estou a falar :) eu depois procuro..e digo-te
Offline

kingless 
Membro
Mensagens 857 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2 Level 1

Citação de: "OFFICER"
Devia era ter um formulário, mas está bom! :D


Es um programador que nem consegue observar o codigo  :lol:

coloca o codigo num ficheiro pode ser email.php,  depois abre browser e digita:

http://teu-site.com/email.php?mbox

e vais ver o que aparece  :wink:
Offline

OFFICER 
Membro
Mensagens 2076 Gostos 0
Troféus totais: 29
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3 Level 2

kingless tú é que és o expert. Um pouco de humildade e menos arrogancia não te ficaria mal. E não sou o único a dizer isto mas eu estou aqui a dizer-te!

Sim, isso é tudo muito bonito, mas se pensares, estás a distribuir um script e não é só para experts! Traduzindo isto para pessoas como tu, uma pessoa que não está habituada, vai abrir o ficheiro normalmente e vai aparecer o quê? Isto:

Código: [Seleccione]
Não Foi Possivel Enviar O Email!!

Como Enviar Email: ?enviar=teu-amigo@email.com&assunto=o assunto do email&msg=Mensagem que queres enviar&de=teu-email@email.com&send=sim


Pensa nisso! Foi isto que eu quis dizer! ;)