fix-delete-expired #47
8 changed files with 39 additions and 18 deletions
Add email.receive config option
- Prepare ver 0.6.0 for release - Fix some minor typos
commit
9cbca723f8
6
Cargo.lock
generated
6
Cargo.lock
generated
|
|
@ -671,7 +671,7 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|||
|
||||
[[package]]
|
||||
name = "better_toml_datetime"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror",
|
||||
|
|
@ -1751,7 +1751,7 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
|||
|
||||
[[package]]
|
||||
name = "jobboerse"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"actix-files",
|
||||
"actix-multipart",
|
||||
|
|
@ -1993,7 +1993,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "multipart_helper"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"actix-multipart",
|
||||
"futures-util",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ members = [".", "packages/*"]
|
|||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.64"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.6.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Optional `email.receive` option to provide an alternate to_addr and reply-to address in case `email.from` is a noreply address
|
||||
|
||||
### Fix
|
||||
|
||||
- Show public preview for job offers when deleting expired offers due to issues with nested `<form>` elements
|
||||
|
|
@ -241,6 +247,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Overview Page of Dependency licenses
|
||||
|
||||
[Unreleased]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/main
|
||||
[0.6.0]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.6.0
|
||||
[0.5.0]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.5.0
|
||||
[0.4.1]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.4.1
|
||||
[0.4.0]: https://www.fs-infmath.uni-kiel.de/git/FS-InfMath/Jobboerse/src/version-0.4.0
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ Cutting a Release
|
|||
-----------------
|
||||
|
||||
* Update the version in the root Cargo.toml according to semver, this will be the version to-be-cut
|
||||
* Update the changelog to reflect all changes since the last release unter `[Unreleased]`
|
||||
* Update the changelog to reflect all changes since the last release under `[Unreleased]`
|
||||
* It's generally recommended to keep the Changelog up to date by adding changes to the unreleased section in the commit that introduces the change
|
||||
* In the now up-to-date changelog add a new section heading for the version to-be-cut between `[Unreleased]` and the first entry of the unreleased section
|
||||
* Add a matching link definition at the bottom of a changelog
|
||||
|
|
|
|||
2
dist/arch/PKGBUILD
vendored
2
dist/arch/PKGBUILD
vendored
|
|
@ -9,7 +9,7 @@ _reponame=Jobboerse
|
|||
_pkgname="${_reponame,,}"
|
||||
_features=()
|
||||
pkgname="${_reponame,,}"
|
||||
pkgver=0.5.0
|
||||
pkgver=0.6.0
|
||||
pkgrel=1
|
||||
pkgdesc="FS-InfMath Job-Offer Page"
|
||||
arch=('x86_64') # Other architectures may work
|
||||
|
|
|
|||
BIN
packages/jobboerse/THIRDPARTY.toml
(Stored with Git LFS)
BIN
packages/jobboerse/THIRDPARTY.toml
(Stored with Git LFS)
Binary file not shown.
|
|
@ -53,13 +53,16 @@ pub(crate) async fn send_confirmation_email(
|
|||
|
||||
let email_body = hb.render(template::EMAIL_CONFIRMATION_PLAIN, email_data)?;
|
||||
|
||||
let message = lettre::Message::builder()
|
||||
let mut message_builder = lettre::Message::builder()
|
||||
.from(email_config.from.to_owned())
|
||||
.to(to_mailbox)
|
||||
.subject(&email_config.subject)
|
||||
.header(user_agent())
|
||||
.header(AutoGeneratedHeader::default())
|
||||
.singlepart(SinglePart::plain(email_body))?;
|
||||
.header(AutoGeneratedHeader::default());
|
||||
if let Some(receive) = email_config.receive.to_owned() {
|
||||
message_builder = message_builder.reply_to(receive);
|
||||
}
|
||||
let message = message_builder.singlepart(SinglePart::plain(email_body))?;
|
||||
|
||||
lettre::AsyncSendmailTransport::new().send(message).await?;
|
||||
|
||||
|
|
@ -93,18 +96,24 @@ pub(crate) async fn send_reviewer_notice(
|
|||
|
||||
debug!("Sending:\n{body}");
|
||||
|
||||
let message = lettre::Message::builder()
|
||||
let mut message_builder = lettre::Message::builder()
|
||||
.from(email_config.from.to_owned())
|
||||
.to(email_config.from.to_owned())
|
||||
.to(email_config
|
||||
.receive
|
||||
.to_owned()
|
||||
.unwrap_or(email_config.from.to_owned()))
|
||||
.subject(&email_config.subject)
|
||||
.header(user_agent())
|
||||
.header(AutoGeneratedHeader::default())
|
||||
.singlepart(SinglePart::plain(body));
|
||||
.header(AutoGeneratedHeader::default());
|
||||
if let Some(receive) = email_config.receive.to_owned() {
|
||||
message_builder = message_builder.reply_to(receive);
|
||||
}
|
||||
let message = message_builder.singlepart(SinglePart::plain(body));
|
||||
|
||||
match message {
|
||||
Ok(msg) => {
|
||||
if let Err(err) = lettre::AsyncSendmailTransport::new().send(msg).await {
|
||||
warn!("Failed to send remainder {}", err);
|
||||
warn!("Failed to send reminder {}", err);
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
|
|
@ -129,13 +138,16 @@ pub(crate) async fn send_publish_notice(
|
|||
|
||||
let email_body = hb.render(template::EMAIL_PUBLISH_NOTICE_PLAIN, &email_data)?;
|
||||
|
||||
let message = lettre::Message::builder()
|
||||
let mut message_builder = lettre::Message::builder()
|
||||
.from(email_config.from.to_owned())
|
||||
.to(to_mailbox)
|
||||
.subject(&email_config.subject)
|
||||
.header(user_agent())
|
||||
.header(AutoGeneratedHeader::default())
|
||||
.singlepart(SinglePart::plain(email_body))?;
|
||||
.header(AutoGeneratedHeader::default());
|
||||
if let Some(receive) = email_config.receive.to_owned() {
|
||||
message_builder = message_builder.reply_to(receive);
|
||||
}
|
||||
let message = message_builder.singlepart(SinglePart::plain(email_body))?;
|
||||
|
||||
lettre::AsyncSendmailTransport::new().send(message).await?;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ pub(crate) struct Link {
|
|||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub(crate) struct EmailConfig {
|
||||
pub(crate) from: Mailbox,
|
||||
#[serde(default)]
|
||||
pub(crate) receive: Option<Mailbox>,
|
||||
pub(crate) subject: String,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue