Fossil SCM

Improvements to the subscription-about-to-expire email message.

drh 2021-06-07 15:30 trunk
Commit 15081699987ae6a3e9a864a24a9dfb0f7722bf8dc2b83233f44ff768c0f8d91a
1 file changed +15 -15
+15 -15
--- src/alerts.c
+++ src/alerts.c
@@ -2707,10 +2707,15 @@
27072707
if( doAuto ){
27082708
alert_backoffice(SENDALERT_TRACE|mFlags);
27092709
}
27102710
}
27112711
2712
+/*
2713
+** Minimum number of days between renewal messages
2714
+*/
2715
+#define ALERT_RENEWAL_MSG_FREQUENCY 7 /* Do renewals at most once/week */
2716
+
27122717
/*
27132718
** Construct the header and body for an email message that will alert
27142719
** a subscriber that their subscriptions are about to expire.
27152720
*/
27162721
static void alert_renewal_msg(
@@ -2725,30 +2730,30 @@
27252730
){
27262731
blob_appendf(pHdr,"To: <%s>\r\n", zEAddr);
27272732
blob_appendf(pHdr,"Subject: %s Subscription to %s expires soon\r\n",
27282733
zRepoName, zUrl);
27292734
blob_appendf(pBody,
2730
- "You are currently receiving email notification of the following kinds\n"
2731
- "of changes to the %s Fossil repository at %s:\n\n",
2735
+ "\nTo renew your subscription, click the following link:\n"
2736
+ "\n %s/renew/%s\n\n",
2737
+ zUrl, zCode
2738
+ );
2739
+ blob_appendf(pBody,
2740
+ "You are currently receiving email notification for the following events\n"
2741
+ "on the %s Fossil repository at %s:\n\n",
27322742
zRepoName, zUrl
27332743
);
27342744
if( strchr(zSub, 'a') ) blob_appendf(pBody, " * Announcements\n");
27352745
if( strchr(zSub, 'c') ) blob_appendf(pBody, " * Check-ins\n");
27362746
if( strchr(zSub, 'f') ) blob_appendf(pBody, " * Forum posts\n");
27372747
if( strchr(zSub, 't') ) blob_appendf(pBody, " * Ticket changes\n");
27382748
if( strchr(zSub, 'w') ) blob_appendf(pBody, " * Wiki changes\n");
2739
- blob_appendf(pBody,
2740
- "\nTo continue receiving email notifications, click the following link\n"
2741
- "\n %s/renew/%s\n\n",
2742
- zUrl, zCode
2743
- );
2744
- blob_appendf(pBody,
2749
+ blob_appendf(pBody, "\n"
27452750
"If you take no action, your subscription will expire and you will be\n"
2746
- "unsubscribed in about a week. To make other changes or to unsubscribe\n"
2751
+ "unsubscribed in about %d days. To make other changes or to unsubscribe\n"
27472752
"immediately, visit the following webpage:\n\n"
27482753
" %s/alerts/%s\n\n",
2749
- zUrl, zCode
2754
+ ALERT_RENEWAL_MSG_FREQUENCY, zUrl, zCode
27502755
);
27512756
}
27522757
27532758
#if INTERFACE
27542759
/*
@@ -2760,15 +2765,10 @@
27602765
#define SENDALERT_TRACE 0x0008 /* Trace operation for debugging */
27612766
#define SENDALERT_RENEWAL 0x0010 /* Send renewal notices */
27622767
27632768
#endif /* INTERFACE */
27642769
2765
-/*
2766
-** Minimum number of days between renewal messages
2767
-*/
2768
-#define ALERT_RENEWAL_MSG_FREQUENCY 7 /* Do renewals at most once/week */
2769
-
27702770
/*
27712771
** Send alert emails to subscribers.
27722772
**
27732773
** This procedure is run by either the backoffice, or in response to the
27742774
** "fossil alerts send" command. Details of operation are controlled by
27752775
--- src/alerts.c
+++ src/alerts.c
@@ -2707,10 +2707,15 @@
2707 if( doAuto ){
2708 alert_backoffice(SENDALERT_TRACE|mFlags);
2709 }
2710 }
2711
 
 
 
 
 
2712 /*
2713 ** Construct the header and body for an email message that will alert
2714 ** a subscriber that their subscriptions are about to expire.
2715 */
2716 static void alert_renewal_msg(
@@ -2725,30 +2730,30 @@
2725 ){
2726 blob_appendf(pHdr,"To: <%s>\r\n", zEAddr);
2727 blob_appendf(pHdr,"Subject: %s Subscription to %s expires soon\r\n",
2728 zRepoName, zUrl);
2729 blob_appendf(pBody,
2730 "You are currently receiving email notification of the following kinds\n"
2731 "of changes to the %s Fossil repository at %s:\n\n",
 
 
 
 
 
2732 zRepoName, zUrl
2733 );
2734 if( strchr(zSub, 'a') ) blob_appendf(pBody, " * Announcements\n");
2735 if( strchr(zSub, 'c') ) blob_appendf(pBody, " * Check-ins\n");
2736 if( strchr(zSub, 'f') ) blob_appendf(pBody, " * Forum posts\n");
2737 if( strchr(zSub, 't') ) blob_appendf(pBody, " * Ticket changes\n");
2738 if( strchr(zSub, 'w') ) blob_appendf(pBody, " * Wiki changes\n");
2739 blob_appendf(pBody,
2740 "\nTo continue receiving email notifications, click the following link\n"
2741 "\n %s/renew/%s\n\n",
2742 zUrl, zCode
2743 );
2744 blob_appendf(pBody,
2745 "If you take no action, your subscription will expire and you will be\n"
2746 "unsubscribed in about a week. To make other changes or to unsubscribe\n"
2747 "immediately, visit the following webpage:\n\n"
2748 " %s/alerts/%s\n\n",
2749 zUrl, zCode
2750 );
2751 }
2752
2753 #if INTERFACE
2754 /*
@@ -2760,15 +2765,10 @@
2760 #define SENDALERT_TRACE 0x0008 /* Trace operation for debugging */
2761 #define SENDALERT_RENEWAL 0x0010 /* Send renewal notices */
2762
2763 #endif /* INTERFACE */
2764
2765 /*
2766 ** Minimum number of days between renewal messages
2767 */
2768 #define ALERT_RENEWAL_MSG_FREQUENCY 7 /* Do renewals at most once/week */
2769
2770 /*
2771 ** Send alert emails to subscribers.
2772 **
2773 ** This procedure is run by either the backoffice, or in response to the
2774 ** "fossil alerts send" command. Details of operation are controlled by
2775
--- src/alerts.c
+++ src/alerts.c
@@ -2707,10 +2707,15 @@
2707 if( doAuto ){
2708 alert_backoffice(SENDALERT_TRACE|mFlags);
2709 }
2710 }
2711
2712 /*
2713 ** Minimum number of days between renewal messages
2714 */
2715 #define ALERT_RENEWAL_MSG_FREQUENCY 7 /* Do renewals at most once/week */
2716
2717 /*
2718 ** Construct the header and body for an email message that will alert
2719 ** a subscriber that their subscriptions are about to expire.
2720 */
2721 static void alert_renewal_msg(
@@ -2725,30 +2730,30 @@
2730 ){
2731 blob_appendf(pHdr,"To: <%s>\r\n", zEAddr);
2732 blob_appendf(pHdr,"Subject: %s Subscription to %s expires soon\r\n",
2733 zRepoName, zUrl);
2734 blob_appendf(pBody,
2735 "\nTo renew your subscription, click the following link:\n"
2736 "\n %s/renew/%s\n\n",
2737 zUrl, zCode
2738 );
2739 blob_appendf(pBody,
2740 "You are currently receiving email notification for the following events\n"
2741 "on the %s Fossil repository at %s:\n\n",
2742 zRepoName, zUrl
2743 );
2744 if( strchr(zSub, 'a') ) blob_appendf(pBody, " * Announcements\n");
2745 if( strchr(zSub, 'c') ) blob_appendf(pBody, " * Check-ins\n");
2746 if( strchr(zSub, 'f') ) blob_appendf(pBody, " * Forum posts\n");
2747 if( strchr(zSub, 't') ) blob_appendf(pBody, " * Ticket changes\n");
2748 if( strchr(zSub, 'w') ) blob_appendf(pBody, " * Wiki changes\n");
2749 blob_appendf(pBody, "\n"
 
 
 
 
 
2750 "If you take no action, your subscription will expire and you will be\n"
2751 "unsubscribed in about %d days. To make other changes or to unsubscribe\n"
2752 "immediately, visit the following webpage:\n\n"
2753 " %s/alerts/%s\n\n",
2754 ALERT_RENEWAL_MSG_FREQUENCY, zUrl, zCode
2755 );
2756 }
2757
2758 #if INTERFACE
2759 /*
@@ -2760,15 +2765,10 @@
2765 #define SENDALERT_TRACE 0x0008 /* Trace operation for debugging */
2766 #define SENDALERT_RENEWAL 0x0010 /* Send renewal notices */
2767
2768 #endif /* INTERFACE */
2769
 
 
 
 
 
2770 /*
2771 ** Send alert emails to subscribers.
2772 **
2773 ** This procedure is run by either the backoffice, or in response to the
2774 ** "fossil alerts send" command. Details of operation are controlled by
2775

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button