aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Main.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 9b5541c..29e9698 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -46,8 +46,12 @@ main = do
(Right birthdates, Right config) -> do
currentDate <- getCurrentDate
let birthdays = filterBirthday currentDate birthdates
- sendMail
- (mailTo config)
- (mailFrom config)
- (mailSubject birthdays)
- (mailBody currentDate birthdays)
+ if not (null birthdays)
+ then
+ sendMail
+ (mailTo config)
+ (mailFrom config)
+ (mailSubject birthdays)
+ (mailBody currentDate birthdays)
+ else
+ return ()