FLws...

Posted 10/02/2006, 06:04
Posted 10/02/2006, 08:41
Posted 10/02/2006, 20:58
Posted 16/02/2006, 13:02
bom, vou te passar um link com um script já pronto creio q vai te ajudar.. http://forum.imaster...howtopic=162806e para colocar mais de um anexo.....
Posted 15/05/2006, 17:30
beckaum, de uma olhada e veja se o problema é q vc nao colocou o parâmetro "Assunto" naa função mail()..
FLws...
Posted 15/05/2006, 18:09
nessa parte ai faltava o que estava em negrito;$message = "--$boundary\n";
$message .= "Content-Transfer-Encoding: 8bits\n";
$message .= "Content-Type: text/plain; charset=\"ISO-8859-1\"\n\n";
$MailAssunto = "Assunto";
$message .= $descricao;
$mensagem=mail($to, $message, $headers, $MailAssunto);
Posted 15/05/2006, 21:20
Posted 16/05/2006, 08:25
Olá gersonab, a função mail() é composta de 5 parâmetros dos quais 3 são obrigatórios:estou iniciando em php , tenho estudado e verificado muitos scripts , no script do nosso colega colocaste que faltava o parâmetro assunto na função mail , como ficaria este parâmetro ja que não encontrei em nenhum lugar , podemos dizer " a palavra assunto" , desculpe o meu questionamento , apenas para um melhor entendimento .
Obrigado .
1. Destino do e-mail
2. Assunto do e-mail
3. Mensagem
4. Cabeçalho adicional
5. Parâmetros adicionais
mail("fulano@dominio.com.br","Sua conta","Olá Fulano, tal tal tal");Então você poderia esta colocando eles na propria função ou voltar através de uma variável global, um campo do formulário.
Posted 16/05/2006, 15:08
Posted 16/05/2006, 15:38
Como assim?valeu ... muito obrigado .
Posted 09/06/2006, 18:51
<?php $nome = $HTTP_POST_VARS["nome"]; $cargo = $HTTP_POST_VARS["cargo"]; $email = $HTTP_POST_VARS["email"]; $idade = $HTTP_POST_VARS["idade"]; $telefone = $HTTP_POST_VARS["telefone"]; $descricao = $HTTP_POST_VARS["descricao"]; $arquivo = $HTTP_POST_VARS["arquivo"]; $headers = "From: $nome <$email>\n"; $headers .= "Return-Path: <$email>\n"; $headers .= "X-Sender: <$email>\n"; $headers .= "X-Mailer: IE / IE 6.2.3\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; $html = " <html> <body bgcolor='#FFFFFF'> <br> <font color='#FF6600'><strong>bla, bla, bla</strong></font> <br> <br> <font color='#FF6600'>Este e-mail foi gerado apartir do preenchimento do formulário no site bla, bla, bla</font> <br><br> <font color='#000000'><strong>Nome: </strong></font><font color='#FF6600'> $nome </font><br> <font color='#000000'><strong>Cidade: </strong></font><font color='#FF6600'> $cargo </font><br> <font color='#000000'><strong>Estado: </strong></font><font color='#FF6600'> $email </font><br> <font color='#000000'><strong>Telefone: </strong></font><font color='#FF6600'> $idade </font><br> <font color='#000000'><strong>E-mail: </strong></font><font color='#FF6600'> $telefone </font><br> <font color='#000000'><strong>Assunto: </strong></font><font color='#FF6600'> $descricao </font><br> </body> </html> "; mail ("blablabla@gmail.com", $assunto, $html, $headers); header ("Location: obrigado.php"); ?>
Posted 15/07/2006, 01:05
Posted 17/07/2006, 08:22
Adicionado ao tópico!cara, tem nao como disponibilizar o down do arquivo? =/ meio ignorante essa perguntan contendo o código na página, mas não sei o que tá acontecendo que quando eu copio ele, vem tudo em uma só linha, dai o código não funciona obviamente, gostei muito a princípio, e tenho umas ideias de incrementar algumas coisas nele ^^
Posted 08/08/2006, 15:01
Edição feita por: Marcos Xicao, 08/08/2006, 15:38.
Posted 22/08/2006, 17:55
<? if ($action != "upload") { print ' <FORM METHOD="post" ENCTYPE="multipart/form-data"> <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="1000000"> <INPUT TYPE="hidden" NAME="action" VALUE="upload"> <TABLE BORDER="1"> <TR> <TD>De: </TD> <TD><input type="text" name="from" size=40><BR></TD> </TR> <TR> <TD>Para: </TD> <TD><input type="text" name="to" size=40><BR></TD> </TR <TR> <TD>Assunto: </TD> <TD><input type="text" name="subject" size=40><BR></TD> </TR <TR> <TD>Cc: </TD> <TD><input type="text" name="cc" size=40><BR></TD> </TR <TR> <TD>Bcc: </TD> <TD><input type="text" name="bcc" size=40><BR></TD> </TR <TR> <TD>Mensagem: </TD> <TD><TEXTAREA NAME="body" ROWS="10" COLS="50"></TEXTAREA></TD> </TR> <TR> <TD>Anexo: </TD> <TD><INPUT TYPE="file" NAME="anexo"></TD> </TR> <TR> <TD COLSPAN="2"><INPUT TYPE="submit" VALUE="Enviar"></TD> </TR> </TABLE> </FORM> '; } if ($action == "upload") { $mime_list = array("html"=>"text/html","htm"=>"text/html", "txt"=>"text/plain", "rtf"=>"text/enriched","csv"=>"text/tab-separated-values","css"=>"text/css","gif"=>"image/gif"); $ABORT = FALSE; $boundary = "XYZ-" . date(dmyhms) . "-ZYX"; $message = "--$boundary\n"; $message .= "Content-Transfer-Encoding: 8bits\n"; $message .= "Content-Type: text/plain; charset=\"ISO-8859-1\"\n\n"; $message .= $body; $message .= "\n"; $attachments[1] = $anexo; foreach ($attachments as $key => $full_path) { if ($full_path !='') { if (file_exists($full_path)){ if ($fp = fopen($full_path,"rb")) { $filename = array_pop(explode(chr(92),$full_path)); $contents = fread($fp,filesize($full_path)); $encoded = base64_encode($contents); $encoded_split = chunk_split($encoded); fclose($fp); $message .= "--$boundary\n"; $message .= "Content-Type: $anexo_type\n"; $message .= "Content-Disposition: attachment; filename=\"$anexo_name\" \n"; $message .= "Content-Transfer-Encoding: base64\n\n"; $message .= "$encoded_split\n"; } else { echo "Impossível abrir o arquivo$key: $filename"; $ABORT = TRUE; } } else { echo "O arquivo$key não existe: $filename"; $ABORT = TRUE; } } } $message .= "--$boundary--\r\n"; $headers = "MIME-Version: 1.0\n"; $headers .= "From: <$from>\r\n"; $headers .= "Content-type: multipart/mixed; boundary=\"$boundary\"\r\n"; $mensagem=mail($to, $subject, $message, $headers); if ($mensagem) { print "Mensagem enviada!"; } else { print "O envio da mensagem falhou!"; } } ?>
<FORM METHOD="post" ENCTYPE="multipart/form-data"> <INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="1000000"> <INPUT TYPE="hidden" NAME="action" VALUE="upload"> <TABLE BORDER="1"> <TR> <TD>De: </TD> <TD><input type="text" name="from" size=40><BR></TD> </TR> <TR> <TD>Para: </TD> <TD><input type="text" name="to" size=40><BR></TD> </TR ><TR> <TD>Assunto: </TD> <TD><input type="text" name="subject" size=40><BR></TD> </TR ><TR> <TD>Cc: </TD> <TD><input type="text" name="cc" size=40><BR></TD> </TR ><TR> <TD>Bcc: </TD> <TD><input type="text" name="bcc" size=40><BR></TD> </TR ><TR> <TD>Mensagem: </TD> <TD><TEXTAREA NAME="body" ROWS="10" COLS="50"></TEXTAREA></TD> </TR> <TR> <TD>Anexo: </TD> <TD><INPUT TYPE="file" NAME="anexo"></TD> </TR> <TR> <TD COLSPAN="2"><INPUT TYPE="submit" VALUE="Enviar"></TD> </TR> </TABLE> </FORM>
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)