Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > PHP
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

 
 
Herramientas Buscar en Tema Desplegado
  #12  
Antiguo 28-03-2011
verde_esmeralda verde_esmeralda is offline
Miembro
NULL
 
Registrado: mar 2011
Posts: 10
Poder: 0
verde_esmeralda Va por buen camino
HOLA aams01

Mira yo solucione lo del e-mail de la siguiente manera:

Código:
 
<?php
require_once("vcl/vcl.inc.php");
//Inclusiones
use_unit("comctrls.inc.php");
use_unit("Zend/zmail.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");
//Definición de clase
class Unidad4 extends Page
{
       public $Edit1 = null;
       public $ZMailTransportSendmail1 = null;
       public $zmCustom = null;
       public $zmtSMTP = null;
       public $reBody = null;
       public $edSubject = null;
       public $Label5 = null;
       public $cbIncludeAttachments = null;
       public $cbPlainTextOnly = null;
       public $meBcc = null;
       public $Label4 = null;
       public $meCC = null;
       public $Label3 = null;
       public $Label2 = null;
       public $meTo = null;
       public $edFrom = null;
       public $Label1 = null;
       public $Button1 = null;
       function zmCustomCustomizeAttachment($sender, $params)
       {
       $result=array();
        list($key, $attachment)=each($params);
        if ($attachment=='mail.php')
        {
            $result['mimetype']=Zend_Mime::TYPE_TEXT;
            $result['disposition']=Zend_Mime::DISPOSITION_INLINE;
        }
        return($result);
 
       }
       function Button1Click($sender, $params)
       {
            $this->zmtSMTP->Host=$this->Edit1->Text;
            $this->zmCustom->FromEmail=$this->edFrom->Text;
            $this->zmCustom->Subject=$this->edSubject->Text;
            $this->zmCustom->BodyText=strip_tags($this->reBody->Text);
            if (!$this->cbPlainTextOnly->Checked) $this->zmCustom->BodyHTML=$this->reBody->Text;
            else $this->zmCustom->BodyHTML='';
            if (count($this->meTo->Lines)>=1) $this->zmCustom->To=array_combine($this->meTo->Lines, array_fill(0,count($this->meTo->Lines),""));
            if (count($this->meCC->Lines)>=1) $this->zmCustom->Cc=array_combine($this->meCC->Lines, array_fill(0,count($this->meCC->Lines),""));
            if (count($this->meBcc->Lines)>=1) $this->zmCustom->Bcc=array_combine($this->meBcc->Lines, array_fill(0,count($this->meBcc->Lines),""));
            if ($this->cbIncludeAttachments->Checked)
            {
                $this->zmCustom->Attachments=array(0=>'mail.php',1=>'mail.xml.php');
            }
            else
            {
                $this->zmCustom->Attachments=array();
            }
            $this->zmCustom->send();
 
       }
}
En el formulario tengo los siguientes componentes:

ZMailTransportSendmail1

ZMailTransportSMTP: en sus propiedades tengo->Authentication:saLogin,host(lo que tienes en host),Username(nombre de tu usuario),UserPassword(Tu password).

ZMail: en la propiedad Transport:va ligado con ZMailTransportSMTP.

Espero te sea de ayuda.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Configuracion D4php llonigualker Internet 0 03-03-2009 17:58:14
Emails, error de conexion en algunas PC nfrfabian Internet 1 19-09-2007 17:03:29
d4php No funciona en la web brandolin PHP 2 06-07-2007 18:57:20
enviar emails jmlifi Varios 9 25-11-2005 21:16:37
Cadenas de emails santana Humor 1 06-09-2004 16:38:00


La franja horaria es GMT +2. Ahora son las 20:34:06.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi