1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
|
@ Save the hyperlink above! You can reuse this same hyperlink to
@ unsubscribe or to change the kinds of alerts you receive.
@
@ If you do not want to subscribe, you can simply ignore this message.
@ You will not be contacted again.
@
;
/*
** WEBPAGE: subscribe
**
** Allow users to subscribe to email notifications.
**
** This page is usually run by users who are not logged in.
|
>
>
>
>
>
>
>
>
>
|
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
|
@ Save the hyperlink above! You can reuse this same hyperlink to
@ unsubscribe or to change the kinds of alerts you receive.
@
@ If you do not want to subscribe, you can simply ignore this message.
@ You will not be contacted again.
@
;
/*
** Append the text of an email confirmation message to the given
** Blob. The security code is in zCode.
*/
void email_append_confirmation_message(Blob *pMsg, const char *zCode){
blob_appendf(pMsg, zConfirmMsg/*works-like:"%s%s%s"*/,
g.zBaseURL, g.zBaseURL, zCode);
}
/*
** WEBPAGE: subscribe
**
** Allow users to subscribe to email notifications.
**
** This page is usually run by users who are not logged in.
|
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
|
/* We need to send a verification email */
Blob hdr, body;
EmailSender *pSender = email_sender_new(0,0);
blob_init(&hdr,0,0);
blob_init(&body,0,0);
blob_appendf(&hdr, "To: <%s>\n", zEAddr);
blob_appendf(&hdr, "Subject: Subscription verification\n");
blob_appendf(&body, zConfirmMsg/*works-like:"%s%s%s"*/,
g.zBaseURL, g.zBaseURL, zCode);
email_send(pSender, &hdr, &body);
style_header("Email Alert Verification");
if( pSender->zErr ){
@ <h1>Internal Error</h1>
@ <p>The following internal error was encountered while trying
@ to send the confirmation email:
@ <blockquote><pre>
|
<
|
|
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
|
/* We need to send a verification email */
Blob hdr, body;
EmailSender *pSender = email_sender_new(0,0);
blob_init(&hdr,0,0);
blob_init(&body,0,0);
blob_appendf(&hdr, "To: <%s>\n", zEAddr);
blob_appendf(&hdr, "Subject: Subscription verification\n");
email_append_confirmation_message(&body, zCode);
email_send(pSender, &hdr, &body);
style_header("Email Alert Verification");
if( pSender->zErr ){
@ <h1>Internal Error</h1>
@ <p>The following internal error was encountered while trying
@ to send the confirmation email:
@ <blockquote><pre>
|