Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/08/2004, 09:03
melf
 
Fecha de Ingreso: mayo-2003
Ubicación: venezolano en viena!
Mensajes: 142
Antigüedad: 21 años
Puntos: 0
De acuerdo

pues siguiendo con el tema me gustaria saber como se activa desde el panel de control (de cualquier swervidor pago)el envio de email--- a he leido por alli que mediante "red hat" , pero mi control panel no tiene dicho "red hat"
aqui encontre algo en la ayuda que me proporcionan pero no se que realmente debo hacer osea que cambios debo hacer en el scrip---
Código PHP:
You can be having trouble sending e-mail using Formmail script, because of the following reasons: 

1. You have entered an e-mail address which is not hosted on our servers. We require the one of either the 'FROM:' e-mail address or the 'TO:' e-mail address to be hosted on our servers. Only if one of them is hosted on our servers, you will be able to send e-mail successfully. 

2. You are using wrong header information. You must always provide the text From:, the name of the sender and an e-mail address. Without one of these three parameters, the formmail script will not work properly and will not deliver e-mail to your mailbox. You can find out more information here: [url]http://www.php.net/manual/en/function.mail.php[/url]  Here are examples of well working formmail scripts: 

First Example: 

<? 
$from 
"From: yourname "
$to "receiver"
$subject "Hi! "
$body "TEST"

if(
mail($to,$subject,$body,$from)) echo "MAIL - OK"
else echo 
"MAIL FAILED"
?> 

Second Example: 

<? 
$from 
"From: sender"
$to "yourname "
$subject "Hi! "
$body "TEST"

if(
mail($to,$subject,$body,$from)) echo "MAIL - OK"
else echo 
"MAIL FAILED"
?>
este es mi script con la cual enviaria los email--
Código PHP:

<?  

/******************
*
* PHP Mailer 2.0   
*This script is easy to configure. Just change the variables below to
*suit your environment and PHP does the rest!


Enter your site details below
******************/
$adminaddress "[email protected]"
$siteaddress ="www.melf.com"
$sitename "en mi trabajo"

//No need to change anything below ... 
// Gets the date and time from your server
$date date("m/d/Y H:i:s");

// Gets the IP Address
if ($REMOTE_ADDR == ""$ip "no ip";
else 
$ip getHostByAddr($REMOTE_ADDR);

// Gets the POST Headers - the Flash variables
$action $HTTP_POST_VARS['action'] ;
$email $HTTP_POST_VARS['email'] ;
$fname $HTTP_POST_VARS['fname'] ;
$lname $HTTP_POST_VARS['lname'] ;
$cname $HTTP_POST_VARS['cname'] ;
$telno $HTTP_POST_VARS['telno'] ;
$comentarios $HTTP_POST_VARS['comentarios'] ;

//Process the form data!
// and send the information collected in the Flash form to Your nominated email address

if ($action == "Enviar") {
    
//
    
mail ("$adminaddress","comentario",
    
"un visitante $sitename  te ha dejado la siguiente informacion\n
    Nombre: $fname 
    Apellido: $lname
    Email: $email
    website: $cname
    telefono: $telno\n
    comentario del visitante :
    ------------------------------
    $comentarios
    
    Logged Info :
    ------------------------------
    Usando: $HTTP_USER_AGENT
    Hostname: $ip
    Direccion IP: $REMOTE_ADDR
    Fecha/Hora:  $date"
,"FROM:$adminaddress" ) ; 
    
    
//This sends a confirmation to your visitor
    
mail ("$email","Gracias por la visita, $sitename"
    
"¡Hola $fname!...\n
    Gracias por tu interes $sitename!\n
    saludos,
    $sitename
    $siteaddress"
,"FROM:$adminaddress") ; 
    
    
//Confirmation is sent back to the Flash form that the process is complete
    
$sendresult "Gracias,resiviras una confirmacion de envio, en tu correo.";
    
$send_answer "answer=";
    
$send_answer .= rawurlencode($sendresult);
    echo 
$send_answer;
//


?>
__________________
http://www.mel-f.com <-- misite :si:
http://www.artepuro.tk <--miforo :no:


[img][/img]
armarse de valor!

Última edición por melf; 25/08/2004 a las 09:29