Add list-unsubscribe
This commit is contained in:
@@ -126,8 +126,8 @@ class Email extends PhpObject {
|
|||||||
$oPHPMailer->Password = Settings::MAIL_PASS; //SMTP password
|
$oPHPMailer->Password = Settings::MAIL_PASS; //SMTP password
|
||||||
$oPHPMailer->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
|
$oPHPMailer->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged
|
||||||
$oPHPMailer->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
|
$oPHPMailer->Port = 587; //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above
|
||||||
$oPHPMailer->setFrom(Settings::MAIL_USER, 'Spotty');
|
$oPHPMailer->setFrom(Settings::MAIL_FROM, 'Spotty');
|
||||||
$oPHPMailer->addReplyTo(Settings::MAIL_USER, 'Spotty');
|
$oPHPMailer->addReplyTo(Settings::MAIL_FROM, 'Spotty');
|
||||||
|
|
||||||
foreach($this->asDests as $asDest) {
|
foreach($this->asDests as $asDest) {
|
||||||
try {
|
try {
|
||||||
@@ -138,6 +138,8 @@ class Email extends PhpObject {
|
|||||||
//Unsubscribe Link
|
//Unsubscribe Link
|
||||||
$sUnsubLink = $this->sServName.'?a=unsubscribe_email&id='.$asDest['id_user'];
|
$sUnsubLink = $this->sServName.'?a=unsubscribe_email&id='.$asDest['id_user'];
|
||||||
$oEmail->setTag('unsubscribe_link', $sUnsubLink);
|
$oEmail->setTag('unsubscribe_link', $sUnsubLink);
|
||||||
|
$oPHPMailer->addCustomHeader('List-Unsubscribe','<mailto:'.Settings::MAIL_FROM.'?subject=unsubscribe>, <'.$sUnsubLink.'>');
|
||||||
|
$oPHPMailer->addCustomHeader('List-Unsubscribe-Post','List-Unsubscribe=One-Click');
|
||||||
|
|
||||||
//Email Content
|
//Email Content
|
||||||
$sHtmlMessage = $oEmail->getMask();
|
$sHtmlMessage = $oEmail->getMask();
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ class Settings
|
|||||||
const TEXT_ENC = 'UTF-8';
|
const TEXT_ENC = 'UTF-8';
|
||||||
const TIMEZONE = 'Europe/Paris';
|
const TIMEZONE = 'Europe/Paris';
|
||||||
const MAIL_SERVER = '';
|
const MAIL_SERVER = '';
|
||||||
|
const MAIL_FROM = '';
|
||||||
const MAIL_USER = '';
|
const MAIL_USER = '';
|
||||||
const MAIL_PASS = '';
|
const MAIL_PASS = '';
|
||||||
const DEBUG = true;
|
const DEBUG = true;
|
||||||
|
|||||||
@@ -478,9 +478,10 @@ $legend-color: $post-color;
|
|||||||
.settings-section {
|
.settings-section {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
margin: 1.5rem 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
@@ -490,7 +491,7 @@ $legend-color: $post-color;
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.title {
|
&.title {
|
||||||
margin: -1rem;
|
margin: -1rem -1rem 0 -1rem;
|
||||||
width: calc(100% + 2rem);
|
width: calc(100% + 2rem);
|
||||||
background: rgba(255, 255, 255, 0.4);
|
background: rgba(255, 255, 255, 0.4);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user