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.