cake-php
[Arriba] [Todas las Listas]

Re: Cogiendo CakeEmail errores

To: cake-php@xxxxxxxxxxxxxxxx
Subject: Re: Cogiendo CakeEmail errores
From: AD7six <andydawson76@xxxxxxxxx>
Date: Thu, 27 Jun 2013 01:12:09 -0700 (PDT)
Delivery-date: Thu, 27 Jun 2013 04:12:22 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=HFY9Oj0n+F2wCkJyEwBZSASr9exS0xY7Gp579qFQcvs=; b=sZth1yQfzdsPaoRY3OeiWD9V4MixHdnjJteY9kAtx1OiCyeqinORmo9njta5P5zwYD dQqkhtUfqmosFsNG/9C5Ywntu2hkxL5ibJykCY1KNTFWSVxFtALFVmKg/KmgW6ChnaeS ityBgCOnpipw+z+w7XpI32ncU9eKq5OA0BJXFTzNBzOsqk6HpfTTCWc3VaLh172W077X G3jnvDzk3gMis3bVYL/dx91KZqbKZ8OVOZJV00kIaoPhMAC8YhI6mmR+kbOnEKV6oNwr VG/aCRYg1Y/1mOMI+uSS14prq2JfobuMa73+s6U52RPFtgFKHxaUAIM6Ly5Y0i05b8wf tCAA==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-beenthere:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=HFY9Oj0n+F2wCkJyEwBZSASr9exS0xY7Gp579qFQcvs=; b=uniHTbiRNw9XX97Pc75+p3krGh9de4JZKoox0UbjyINBm/NMJ2afWr86HLBHUdr39v gZaS3/WYsl91TEZqf9N9fwkrfr0g8PBbz08iTFZzx6VyDLhDa8i9dbxRUKpDI8zp9dJ3 b+2EM4dSyzuvpH/sAQ4eko9sc3r2LgTeBZDJlt2AhHP43GrwvMhKuE8vx6XUsibFalw7 CTqdz9lDcG4WPtQ1PCiRqusZJKlj/Aobe9QCwOn1clv4ijog1EBubyU9mAmVJQ+dm9jO FdSRjNRlMpD/EzHtM54LxgZo2KRMbDM27C9QqDkf5rUapkZRkF0Y/jSKD3K9YYvplhTV 50vw==
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <3b93a903-907b-4016-bec9-f46214d9f130@googlegroups.com>
List-archive: <http://groups.google.com/group/cake-php>
List-help: <http://groups.google.com/support/>, <mailto:cake-php+help@googlegroups.com>
List-id: <cake-php.googlegroups.com>
List-post: <http://groups.google.com/group/cake-php/post>, <mailto:cake-php@googlegroups.com>
List-subscribe: <http://groups.google.com/group/cake-php/subscribe>, <mailto:cake-php+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/cake-php/subscribe>, <mailto:googlegroups-manage+1003367825667+unsubscribe@googlegroups.com>
Mailing-list: list cake-php@xxxxxxxxxxxxxxxx; contact cake-php+owners@xxxxxxxxxxxxxxxx
References: <3b93a903-907b-4016-bec9-f46214d9f130@googlegroups.com>
Reply-to: cake-php@xxxxxxxxxxxxxxxx
Sender: cake-php@xxxxxxxxxxxxxxxx
Justo envolverlo en un probar-coger ANUNCIO

de bloque

En jueves, 27 junio 2013 07:33:12 *UTC+2, Sarah escribió:
>
> he *legacy dato en el *database y que significa incompleto *email 
> las direcciones han sido introducidas por usuarios. Puedo utilizar validar para asegurar todo nuevo 
> unos son buenos pero todavía tengo que vivir con el viejo.
>
> Mi código es bastante sencillo
>
> $*Email = nuevo *CakeEmail('*smtp');
> $*Email->a($*email);
> $*Email->tema($*v['Llamada']['sujeto']);
> $*Email->*setHeaders(variedad('*X-MC-*Tags' => 
> $este->lista_de asociación[$*v['Contenido']['asociación_*id']]));
> $*Email->enviar($producción);
>
> pero si el *email es *unusable el guión falla.
>
> Cómo puede yo *pre-validar o coger aquel error, echar una excepción y movimiento encima?
>

-- 
Gustarnos en *FaceBook *https://www.facebook.com/*CakePHP
nos Encuentra en *Twitter *http://*twitter.*com/*CakePHP

--- 
Recibiste este mensaje porque eres *subscribed al *Google Grupos "*CakePHP" grupo.
A *unsubscribe de este grupo y la parón que recibe *emails de él, enviar un *email a pastel-*php+unsubscribe@xxxxxxxxxxxxxxxx.
A correo a este grupo, envía *email a pastel-php@xxxxxxxxxxxxxxxx.
Visita este grupo en *http://grupos.*google.*com/Pastel/de grupo-*php.
Para más opciones, visita *https://grupos.*google.*com/Los Grupos/optan_fuera.


Just wrap it in a try-catch block

AD

On Thursday, 27 June 2013 07:33:12 UTC+2, Sarah wrote:
>
> I have legacy data in the database and that means incomplete email 
> addresses have been entered by users. I can use validate to ensure all new 
> ones are good but I still have to live with the old.
>
> My code is pretty simple
>
> $Email = new CakeEmail('smtp');
> $Email->to($email);
> $Email->subject($v['Call']['subject']);
> $Email->setHeaders(array('X-MC-Tags' => 
> $this->association_list[$v['Content']['association_id']]));
> $Email->send($output);
>
> but if the email is unusable the script fails.
>
> How can I pre-validate or catch that error, throw an exception and move on?
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


<Anterior por Tema] Tema Actual [Siguiente por Tema>