Last active
January 21, 2016 13:00
-
-
Save bytefade/4a802cfcb8b556fd09c4 to your computer and use it in GitHub Desktop.
Simple mail wordpress for tests
This file contains hidden or 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 | |
// 3 - Se der erro me envia uma mensagem | |
$message = "Postagem atualizado no site:\n\n"; | |
$message .= $post->post_title . ": " . $post_url . "\n\n"; | |
$message .= "URL pequena: " . $short_url . " URL Expand" . $long_url . "\n\n"; | |
$message .= "VAR_DUMP: " . var_dump($response); | |
if (!$response) { | |
$subject = 'ERRRO - Teste criar/atualizar post e API short url'; | |
// Send email to admin. | |
wp_mail('[email protected]', $subject, $message); | |
return; | |
} | |
$subject = 'SUCESSO - Teste criar/atualizar post e API short url'; | |
// Send email to admin. | |
wp_mail('[email protected]', $subject, $message); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment