summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mail/mail.vala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mail/mail.vala b/src/mail/mail.vala
index e1eec1d..4f9f7e3 100644
--- a/src/mail/mail.vala
+++ b/src/mail/mail.vala
@@ -66,8 +66,13 @@ public class MailImplementation {
owned get {
MailDate result = {};
var tmp = m.get_date();
- result.timezone = tmp.get_timezone_abbreviation();
- result.date = tmp.to_unix();
+ if (tmp != null) {
+ result.timezone = tmp.get_timezone_abbreviation();
+ result.date = tmp.to_unix();
+ } else {
+ result.timezone = "";
+ result.date = 0;
+ }
return result;
}
set {
@@ -80,6 +85,7 @@ public class MailImplementation {
public MailImplementation() {
m = new GMime.Message(true);
m.set_header("X-Mailer", "KtT Shopsystem", "utf-8");
+ m.set_date(new DateTime.now_local());
attachments = new GMime.Part[0];
filter_smtp = new GMime.FilterSmtpData();
filter_unix2dos = new GMime.FilterUnix2Dos(true);