Fossil SCM
Improvements to the subscription-about-to-expire email message.
Commit
15081699987ae6a3e9a864a24a9dfb0f7722bf8dc2b83233f44ff768c0f8d91a
Parent
5d28db4da1217e3…
1 file changed
+15
-15
+15
-15
| --- src/alerts.c | ||
| +++ src/alerts.c | ||
| @@ -2707,10 +2707,15 @@ | ||
| 2707 | 2707 | if( doAuto ){ |
| 2708 | 2708 | alert_backoffice(SENDALERT_TRACE|mFlags); |
| 2709 | 2709 | } |
| 2710 | 2710 | } |
| 2711 | 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 | + | |
| 2712 | 2717 | /* |
| 2713 | 2718 | ** Construct the header and body for an email message that will alert |
| 2714 | 2719 | ** a subscriber that their subscriptions are about to expire. |
| 2715 | 2720 | */ |
| 2716 | 2721 | static void alert_renewal_msg( |
| @@ -2725,30 +2730,30 @@ | ||
| 2725 | 2730 | ){ |
| 2726 | 2731 | blob_appendf(pHdr,"To: <%s>\r\n", zEAddr); |
| 2727 | 2732 | blob_appendf(pHdr,"Subject: %s Subscription to %s expires soon\r\n", |
| 2728 | 2733 | zRepoName, zUrl); |
| 2729 | 2734 | 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", | |
| 2732 | 2742 | zRepoName, zUrl |
| 2733 | 2743 | ); |
| 2734 | 2744 | if( strchr(zSub, 'a') ) blob_appendf(pBody, " * Announcements\n"); |
| 2735 | 2745 | if( strchr(zSub, 'c') ) blob_appendf(pBody, " * Check-ins\n"); |
| 2736 | 2746 | if( strchr(zSub, 'f') ) blob_appendf(pBody, " * Forum posts\n"); |
| 2737 | 2747 | if( strchr(zSub, 't') ) blob_appendf(pBody, " * Ticket changes\n"); |
| 2738 | 2748 | 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" | |
| 2745 | 2750 | "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" | |
| 2747 | 2752 | "immediately, visit the following webpage:\n\n" |
| 2748 | 2753 | " %s/alerts/%s\n\n", |
| 2749 | - zUrl, zCode | |
| 2754 | + ALERT_RENEWAL_MSG_FREQUENCY, zUrl, zCode | |
| 2750 | 2755 | ); |
| 2751 | 2756 | } |
| 2752 | 2757 | |
| 2753 | 2758 | #if INTERFACE |
| 2754 | 2759 | /* |
| @@ -2760,15 +2765,10 @@ | ||
| 2760 | 2765 | #define SENDALERT_TRACE 0x0008 /* Trace operation for debugging */ |
| 2761 | 2766 | #define SENDALERT_RENEWAL 0x0010 /* Send renewal notices */ |
| 2762 | 2767 | |
| 2763 | 2768 | #endif /* INTERFACE */ |
| 2764 | 2769 | |
| 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 | 2770 | /* |
| 2771 | 2771 | ** Send alert emails to subscribers. |
| 2772 | 2772 | ** |
| 2773 | 2773 | ** This procedure is run by either the backoffice, or in response to the |
| 2774 | 2774 | ** "fossil alerts send" command. Details of operation are controlled by |
| 2775 | 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 | ** 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 |