Commit 9024f289 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Add path basename for attachment.

parent 0409541b
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

import logging
import mimetypes
import os
import smtplib

from config import Config
@@ -64,7 +65,7 @@ class Mailer(object):
            self.message.add_attachment(fp.read(),
                                        maintype = maintype,
                                        subtype = subtype,
                                        filename = filePath)
                                        filename = os.path.basename(filePath))

    def send(self):
        """Send email message."""