|
|
@@ -174,15 +174,19 @@ Produits disponibles : |
|
|
|
$fromEmail = $producerModule->getEmailOpendistrib($producer) ; |
|
|
|
$fromName = $producer->name ; |
|
|
|
|
|
|
|
$linkProducer = 'https://'.$producer->slug.'.opendistrib.net'; |
|
|
|
$linkUnsubscribe = Yii::$app->urlManagerProducer->createAbsoluteUrl(['newsletter/unsubscribe', 'slug_producer' => $producer->slug]); |
|
|
|
|
|
|
|
// Message inscription newsletter |
|
|
|
$messageAutoText .= " |
|
|
|
|
|
|
|
-- |
|
|
|
Boutique : ".$linkProducer." |
|
|
|
Me désinscrire : ".$linkUnsubscribe; |
|
|
|
|
|
|
|
Me désinscrire de ce bulletin d'information : |
|
|
|
".Yii::$app->urlManagerProducer->createAbsoluteUrl(['newsletter/index', 'slug_producer' => $producer->slug]); |
|
|
|
|
|
|
|
$messageAutoHtml .= "<br /><br />--<br /><br /><a href=\"".Yii::$app->urlManagerProducer->createAbsoluteUrl(['newsletter/unsubscribe', 'slug_producer' => $producer->slug])."\">Me désinscrire</a> de ce bulletin d'information"; |
|
|
|
$messageAutoHtml .= "<br /><br />--<br>"; |
|
|
|
$messageAutoHtml .= "Boutique : <a href=\"".$linkProducer."\">".$linkProducer."</a><br>"; |
|
|
|
$messageAutoHtml .= "Me désinscrire : <a href=\"".$linkUnsubscribe."\">".$linkUnsubscribe."</a>"; |
|
|
|
} |
|
|
|
else { |
|
|
|
$fromEmail = 'contact@opendistrib.net' ; |
|
|
@@ -190,9 +194,9 @@ Me désinscrire de ce bulletin d'information : |
|
|
|
} |
|
|
|
|
|
|
|
// Tests |
|
|
|
/*$usersArray = [ |
|
|
|
['email' => '', 'name' => '', 'lastname' => ''] |
|
|
|
];*/ |
|
|
|
$usersArray = [ |
|
|
|
['email' => 'contact@guillaumebourgeois.fr', 'name' => '', 'lastname' => ''] |
|
|
|
]; |
|
|
|
|
|
|
|
foreach($usersArray as $user) { |
|
|
|
$body['Messages'][] = [ |