rewrite manage mail
This commit is contained in:
parent
7141d8dda1
commit
38926b4cda
|
@ -1,27 +1,26 @@
|
|||
|
||||
<!doctype html>
|
||||
<html lang=en>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Please confirm deletion of your key</title>
|
||||
<title>Manage your key on {{domain}}</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Someone, presumably you, requested that your key will no longer
|
||||
be available when searching for your email addresses on
|
||||
<a href="{{base_uri}}">{{domain}}</a>.
|
||||
</p>
|
||||
Hi,
|
||||
<p>
|
||||
If it was not you, please ignore this email.
|
||||
</p>
|
||||
this is an automated message from <a rel="nofollow" href="{{base_uri}}" style="text-decoration:none; color: #333"><tt>{{domain}}</tt></a>. If you didn't
|
||||
request this message, please ignore it.
|
||||
<p>
|
||||
To de-list your key on <a href="{{base_uri}}">{{domain}}</a>,
|
||||
follow this link:
|
||||
</p>
|
||||
OpenPGP key: <tt>{{primary_fp}}</tt>
|
||||
<p>
|
||||
<a href="{{base_uri}}{{uri}}">{{base_uri}}{{uri}}</a>
|
||||
</p>
|
||||
To manage and delete listed addresses on this key, please follow
|
||||
the link below:
|
||||
<p>
|
||||
If you do not want to de-list your key, please ignore this
|
||||
email.
|
||||
<a href="{{uri}}">{{uri}}</a>
|
||||
<p>
|
||||
You can find more info at <a href="{{base_uri}}/about">{{domain}}/about</a>.
|
||||
<p>
|
||||
Greetings from the <a rel="nofollow" href="{{base_uri}}" style="text-decoration:none; color: #333"><tt>keys.openpgp.org</tt></a> team
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
Someone, presumably you, requested that your key will no longer be
|
||||
available when searching for your email addresses on {{domain}}.
|
||||
Hi,
|
||||
|
||||
If it was not you, please ignore this email.
|
||||
this is an automated message from {{domain}}. If you didn't
|
||||
request this message, please ignore it.
|
||||
|
||||
To de-list your key on {{domain}}, follow this link:
|
||||
OpenPGP key: {{primary_fp}}
|
||||
|
||||
{{base_uri}}{{uri}}
|
||||
To manage and delete listed addresses on this key, please follow
|
||||
the link below:
|
||||
|
||||
{{uri}}
|
||||
|
||||
You can find more info at {{base_uri}}/about
|
||||
|
||||
Greetings from the keys.openpgp.org team
|
||||
|
||||
If you do not want to de-list your key, please ignore this email.
|
||||
|
|
|
@ -6,7 +6,7 @@ request this message, please ignore it.
|
|||
OpenPGP key: {{primary_fp}}
|
||||
|
||||
To let others find this key from your email address "{{userid}}",
|
||||
please click the link below:
|
||||
please follow the link below:
|
||||
|
||||
{{uri}}
|
||||
|
||||
|
|
|
@ -90,17 +90,17 @@ impl Service {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn send_manage_token(&self, recipient: &Email, uri: &str)
|
||||
pub fn send_manage_token(&self, recipient: &Email, link_path: &str)
|
||||
-> Result<()> {
|
||||
let ctx = context::Manage {
|
||||
uri: uri.to_string(),
|
||||
uri: format!("{}{}", self.base_uri, link_path),
|
||||
base_uri: self.base_uri.clone(),
|
||||
domain: self.domain.clone(),
|
||||
};
|
||||
|
||||
self.send(
|
||||
&[recipient],
|
||||
&format!("{}: Manage your key", &self.domain),
|
||||
&format!("Manage your key on {}", self.domain),
|
||||
"manage",
|
||||
ctx,
|
||||
)
|
||||
|
|
|
@ -148,9 +148,9 @@ pub fn vks_manage_post(
|
|||
|
||||
let fpr: Fingerprint = tpk.fingerprint().try_into().unwrap();
|
||||
let token = token_service.create(&StatelessVerifyToken { fpr });
|
||||
let token_uri = uri!(vks_manage_key: token).to_string();
|
||||
let link_path = uri!(vks_manage_key: token).to_string();
|
||||
|
||||
if let Err(e) = mail_service.send_manage_token(&email, &token_uri) {
|
||||
if let Err(e) = mail_service.send_manage_token(&email, &link_path) {
|
||||
return MyResponse::ise(e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue