Skip to content

Instantly share code, notes, and snippets.

@jpurpleman
Created March 4, 2016 03:55
Show Gist options
  • Save jpurpleman/906054b6b966797d0119 to your computer and use it in GitHub Desktop.
Save jpurpleman/906054b6b966797d0119 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Change Email Address
Plugin URI: http://www.dawsoncollege.qc.ca
Description: Changes email address, from name and sets HTML content type
Version: 0.1
Author: Jonathan Perlman
Author URI: http://www.dawsoncollege.qc.ca
*/
/**
* Changes the "from name" of the reset password email from "WordPress"
*/
function asp_mail_from_name() {
return esc_attr( 'Dawson College Admissions' );
}
add_filter( 'wp_mail_from_name', 'asp_mail_from_name');
/**
* Changes the "from address "" of the reset password email
*/
function asp_mail_from() {
return is_email( 'admissions@dawsoncollege.qc.ca' );
}
add_filter( 'wp_mail_from', 'asp_mail_from');
/**
* Allows us to send html email across the board
*/
function asp_mail_content_type() {
return 'text/html';
}
add_filter('wp_mail_content_type', 'asp_mail_content_type');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment