Skip to content

Commit 8dab8c8

Browse files
committed
docs: update append docs with regards to date-time
1 parent a1242a8 commit 8dab8c8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/client.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,12 @@ impl<T: Read + Write> Session<T> {
11101110
///
11111111
/// The [`\Recent` flag](https://tools.ietf.org/html/rfc3501#section-2.3.2) is not
11121112
/// allowed as an argument to `APPEND` and will be filtered out if present in `flags`.
1113+
///
1114+
/// Pass a date in order to set the date that the message was originally sent.
1115+
///
1116+
/// > If a date-time is specified, the internal date SHOULD be set in
1117+
/// > the resulting message; otherwise, the internal date of the
1118+
/// > resulting message is set to the current date and time by default.
11131119
pub fn append_with_flags_and_date<S: AsRef<str>, B: AsRef<[u8]>>(
11141120
&mut self,
11151121
mailbox: S,
@@ -1124,13 +1130,6 @@ impl<T: Read + Write> Session<T> {
11241130
.map(|f| f.to_string())
11251131
.collect::<Vec<String>>()
11261132
.join(" ");
1127-
1128-
// date-time = DQUOTE date-day-fixed "-" date-month "-" date-year SP time SP zone DQUOTE
1129-
// date-day-fixed = (SP DIGIT) / 2DIGIT
1130-
// date-month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
1131-
// date-year = 4DIGIT
1132-
// time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
1133-
// zone = ("+" / "-") 4DIGIT
11341133
let datestr = match date {
11351134
Some(date) => format!(" \"{} +0000\"", date.format("%d-%h-%Y %T")),
11361135
None => "".to_string(),

0 commit comments

Comments
 (0)