Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feliciaceballos/60f978ef743905b146376df17d96cb37 to your computer and use it in GitHub Desktop.
Save feliciaceballos/60f978ef743905b146376df17d96cb37 to your computer and use it in GitHub Desktop.
Create Email Templates based on Prospect Status
function email_template($email) {
global $wp_query, $post;
$welcome_email = "<a href=mailto:$email?Subject=Thank%20You%20for%20your%20Inquiry&body=I%20will%20review%20your%20needs%20and%20get%20back%20to%20you%20with%20an%20estimate%20in%20the%20next%2048%20hours.%0A%0AWe%20look%20forward%20to%20speaking%20with%20you%20soon.>$email</a>";
$estimate_follow_up = "<a href=mailto:$email?Subject=Estimate%20Follow%20Up&body=I%20wanted%20to%20follow%20up%20on%20the%20estimate%20I%20sent%20over%20a%20few%20days%20ago%20and%20see%20if%20you%20had%20any%20questions.%20When%20is%20a%20good%20time%20for%20us%20to%20get%20on%20the%20phone%20and%20go%20over%20it%20together?%0A%0AYou%Thanks,>$email</a>";
$general_follow_up = "<a href=mailto:$email?Subject=Following%20Up>$email</a>";
if (in_category('new-lead')) :
echo $welcome_email;
elseif (in_category('sent-estimate')) :
echo $estimate_follow_up;
else :
echo $follow_up;
endif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment