JeckDu Posted June 5 Share Posted June 5 En mi formulario de PrestaShop cualquier correo que le introduzcas parece ser no válido. No sé qué problema puede haber, además, cuando le doy a enviar correos de prueba, sale el mensaje de éxito, pero nunca llega ¿Alguien tiene alguna idea de que es lo que puede ocurrir? Lo del color diferente es porque cuando eliges una opción del autocompletar está en azul Link to comment Share on other sites More sharing options...
Zitarka Posted June 5 Share Posted June 5 Hola, tendrías que revisar el código que válida los emails 1 Link to comment Share on other sites More sharing options...
JeckDu Posted June 6 Author Share Posted June 6 14 hours ago, zitarka said: Hola, tendrías que revisar el código que válida los emails Hola, he ido a Validate.php, pero no veo nada que esté mal y que cause este error. Este es el trozo de código que habla de la validación del correo, no lo he modificado nunca, así que debería de funcionar en teoría (no tengo mucha idea de código) public static function isEmail($email) { // Check if the value is empty if (empty($email)) { return false; } $validator = Validation::createValidator(); $errors = $validator->validate($email, new Email([ 'mode' => 'loose', ])); if (count($errors) > 0) { return false; } // Check if the value is correct according to both validators (RFC & SwiftMailer) return (new EmailValidator())->isValid($email, new MultipleValidationWithAnd([ new RFCValidation(), new SwiftMailerValidation(), // special validation to be compatible with Swift Mailer ])); } ¿A alguien más le pasa algo similar? Link to comment Share on other sites More sharing options...
JeckDu Posted June 11 Author Share Posted June 11 Al final he tenido que usar un módulo de correos, puede que el problema sea del formulario por determinado del PrestaShop o algo raro que haya ahí Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now