Welcome Guest, Not a member yet? Register   Sign In
Form by Mail... I need help, please... I beg u...
#1

[eluser]Tanque[/eluser]
This is the Controller

Code:
<?php
class Contactos extends Controller
{
    function index()
    {
        $this->load->helper('form');
        $this->load->library('validation');
        
        $data['secciones']     = array(
                                                                anchor('inicio',    'Inicio'),
                                         anchor('servicios',    'Servicios'),
                                         anchor('clientes',    'Clientes'),
                                         anchor('staff',        'Staff'),
                                         anchor('informes',    'Informes'),
                                         anchor('contactos',    'Contactos'));
        $data['attributes'] = array('id' => 'nav');
    $data['navegacion'] = ul($data['secciones'], $data['attributes']);
    
    $data['subtitulo']    =    'Consultores en Finanzas';
    $data['empresa']        =    'Maxinver';
    $data['title']            =    'Maxinver - Consultores en Finanzas';
    $data['seccion']        =    'Informes';
    $data['contacto']        =    'Teléfono 4328 9455';
    $data['logo']                =    img('images/logo.jpg');
    
    $data['base_url']        =    $this->config->item('base_url');
        
        $rules['remitente']    = "trim|required|valid_email";
        $rules['titulo']        = "trim|required";
        $rules['contenido']    = "trim|required";

        $this->validation->set_rules($rules);
        
        if ($this->validation->run() == FALSE)
        {
            $this->load->view('contactos', $data);
        }
        else
        {
            $this->load->view('contactos/email');
        }
    }
    
    function email()
    {
        $this->load->library('email');
        
        $data['secciones']     = array(
                                                                anchor('inicio',    'Inicio'),
                                         anchor('servicios',    'Servicios'),
                                         anchor('clientes',    'Clientes'),
                                         anchor('staff',        'Staff'),
                                         anchor('informes',    'Informes'),
                                         anchor('contactos',    'Contactos'));
        $data['attributes'] = array('id' => 'nav');
    $data['navegacion'] = ul($data['secciones'], $data['attributes']);
    
    $data['subtitulo']    =    'Consultores en Finanzas';
    $data['empresa']        =    'Maxinver';
    $data['title']            =    'Maxinver - Consultores en Finanzas';
    $data['seccion']        =    'Informes';
    $data['contacto']        =    'Teléfono 4328 9455';
    $data['logo']                =    img('images/logo.jpg');
    
    $data['base_url']        =    $this->config->item('base_url');
    
        $destinatario = $_POST['destinatario'];
        $remitente        =    $_POST['remitente'];
        $titulo                =    $_POST['titulo'];
        $contenido        =    $_POST['contenido'];
        
        $this->email->from($remitente, 'Desde el Sitio');
        $this->email->to($destinatario);

        $this->email->subject($titulo);
        $this->email->message($contenido);    

        $this->email->send();

        $this->load->view('email_exito', $data);
    }
}
?>

This is the View...
Code:
<html>

<head>
  <link rel='stylesheet' type='text/css' media='all' href="{base_url}/default.css" />
  <title>{title}</title>
</head>

<body>
  <div id="wrap">
    <div id="page">
      <div id="header">
        {navegacion}
      </div>
      <div id="content-primary">
          {logo}
          <h1>{subtitulo}</h1>
          <h3>{seccion}</h3>
          <ul class='estilo'>
                    <li>Elaboraci&oacute;n de Informes Peri&oacute;dicos sobre Temas Econ&oacute;micos y Financieros, tanto globales como locales</li>
            <li>Presentaciones en Oficinas de Clientes sobre perspectivas y recomendaciones de Inversi&oacute;n y/o Endeudamiento</li>
            <li>Dictado de Seminarios 'In Company' sobre Temas de Mercadeo de Capitales</li>
            <li>Dise&ntilde;o de Estrategias Financieras, de Inversi&oacute;n y de Financiamiento</li>
            <li>Seguimiento y An&aacute;lisis de Alternativas de Inversi&oacute;n en Mercados Locales y 'Off Shore'</li>
            <li>Reestructuraci&oacute;n de Pasivos Empresarios</li>
                </ul>
                {navegsec}
            </div>
      <div id="footer">
          <p>{contacto}</p>
      </div>
    </div>
  </div>
&lt;/body&gt;

&lt;/html&gt;

a week ago, it's running perfectly... now I can't use it... help me... please...
#2

[eluser]Derek Allard[/eluser]
Does email debugger reveal anything interesting?

Contact your host... have they changed anything?

When things were working, and then stop, and you haven't touched anything its almost always a change made on the server.
#3

[eluser]Tanque[/eluser]
i was told they change smtp port from 25 to 1025... can be this the problem?...
#4

[eluser]Derek Allard[/eluser]
Nice... I love hosts who just randomly change things and then wait for you to complain before they tell you...

You can set the port like this
Code:
$this->load->library('email');
$config['smtp_port'] = '1025';
$this->email->initialize($config);
#5

[eluser]Tanque[/eluser]
let's try it... i'll tell you if it work...
#6

[eluser]Tanque[/eluser]
and the answer it's NO... i hate my hosting... hehehehe... hey, can i config other smtp for my email library?...
#7

[eluser]Tanque[/eluser]
it's been corrected... it was a server problem, not a code problem... i'd just corrected my code and put it the way it was and work lovely...




Theme © iAndrew 2016 - Forum software by © MyBB