Last active
June 28, 2017 17:51
-
-
Save asterion/c1b84d2ddcb07928809ccc3d618c0b12 to your computer and use it in GitHub Desktop.
Envio de email usando wp, prueba.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$uploaddir = trim(ABSPATH, '/') . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR; | |
$attachments = []; | |
foreach ($_FILES as $i => $data) { | |
$uploadfile = $uploaddir . basename($data['name']); | |
if (move_uploaded_file($data['tmp_name'], $uploadfile)) { | |
$attachments[$i] = $uploadfile; | |
} | |
} | |
wp_mail($conReceptor,$conAsunto,$conMensaje, $attachments, array( 'Reply-To: '.$conNombre.' <'.$conCorreo2.'>')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment