Unsubscribe option available on website
This commit is contained in:
@@ -50,6 +50,10 @@ pub struct ConfirmTemplate;
|
||||
#[template(path = "../templates/404.html")]
|
||||
pub struct NotFoundTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/unsubscribe_confirm.html")]
|
||||
pub struct UnsubscribeConfirmTemplate;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "../templates/unsubscribe.html")]
|
||||
pub struct UnsubscribeTemplate;
|
||||
@@ -103,7 +107,7 @@ Alphonse
|
||||
|
||||
zero2prod - Building better backends with Rust
|
||||
Visit the blog: {}
|
||||
Unsubscribe: {}/unsubscribe?token=UNSUBSCRIBE_TOKEN
|
||||
Unsubscribe: {}/unsubscribe/confirm?token=UNSUBSCRIBE_TOKEN
|
||||
|
||||
You're receiving this because you subscribed to the zero2prod newsletter."#,
|
||||
self.post_title, self.base_url, self.post_id, self.base_url, self.base_url,
|
||||
@@ -124,7 +128,7 @@ impl<'a> EmailTemplate for StandaloneEmailTemplate<'a> {
|
||||
|
||||
zero2prod - Building better backends with Rust
|
||||
Visit the blog: {}
|
||||
Unsubscribe: {}/unsubscribe?token=UNSUBSCRIBE_TOKEN
|
||||
Unsubscribe: {}/unsubscribe/confirm?token=UNSUBSCRIBE_TOKEN
|
||||
|
||||
You're receiving this because you subscribed to the zero2prod newsletter."#,
|
||||
self.text_content, self.base_url, self.base_url
|
||||
|
||||
Reference in New Issue
Block a user