You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new version of the package {{ krate }} ({{ version }}) was published{{ publisher_info }} at {{ publish_time }}.
4
+
5
+
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings.
warn!("Failed to send publish notification for {krate}@{version} to {email_address}: {err}")
104
+
}).map_err(|_| ())
105
+
}
106
+
Err(err) => {
107
+
warn!("Failed to render publish notification email template for {krate}@{version} to {email_address}: {err}");
108
+
Err(())
109
+
}
110
+
};
98
111
99
112
results.push(result);
100
113
}
@@ -153,39 +166,3 @@ impl PublishDetails {
153
166
.await
154
167
}
155
168
}
156
-
157
-
/// Email template for notifying crate owners about a new crate version
158
-
/// being published.
159
-
#[derive(Debug,Clone)]
160
-
structPublishNotificationEmail<'a>{
161
-
recipient:&'astr,
162
-
krate:&'astr,
163
-
version:&'astr,
164
-
publish_time:&'astr,
165
-
publisher_info:&'astr,
166
-
}
167
-
168
-
implEmailforPublishNotificationEmail<'_>{
169
-
fnsubject(&self) -> String{
170
-
letSelf{ krate, version, .. } = self;
171
-
format!("crates.io: Successfully published {krate}@{version}")
172
-
}
173
-
174
-
fnbody(&self) -> String{
175
-
letSelf{
176
-
recipient,
177
-
krate,
178
-
version,
179
-
publish_time,
180
-
publisher_info,
181
-
} = self;
182
-
183
-
format!(
184
-
"Hello {recipient}!
185
-
186
-
A new version of the package {krate} ({version}) was published{publisher_info} at {publish_time}.
187
-
188
-
If you have questions or security concerns, you can contact us at help@crates.io. If you would like to stop receiving these security notifications, you can disable them in your account settings."
0 commit comments