Skip to content

Instantly share code, notes, and snippets.

add_action( 'phpmailer_init', function ( $phpmailer ) {
$phpmailer->isSMTP();
$phpmailer->Host = 'smtp.exemple.com';
$phpmailer->SMTPAuth = true; // Indispensable pour forcer l'authentification
$phpmailer->Port = 465;
$phpmailer->Username = 'utilisateur';
$phpmailer->Password = 'motdepasse';
// Configurations complémentaires
//$phpmailer->SMTPSecure = "ssl"; // Sécurisation du serveur SMTP : ssl ou tls
@ligne13
ligne13 / gist:4a5ac179c694520f492969b03b7d09d1
Created October 18, 2019 13:22
[nginx] Use images from production in local website
location ~ ^/wp-content/uploads/(.*) {
rewrite ^/wp-content/uploads/(.*)$ https://www.example.com/wp-content/uploads/$1 permanent;
}
@ligne13
ligne13 / pickDeep-example.js
Last active January 11, 2019 12:53
pickDeep function (like lodash pick function but with recursivity). Demo : https://jsbin.com/demaveq/edit?js,console
var test = {
key1: {
key11: 'test11',
key13: 'test13'
},
key2: 'test2'
};
var source = {
key1: {