aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileAttachment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileAttachment.cpp')
-rw-r--r--src/fileAttachment.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fileAttachment.cpp b/src/fileAttachment.cpp
index fe62edc6..da4d9c4c 100644
--- a/src/fileAttachment.cpp
+++ b/src/fileAttachment.cpp
@@ -36,6 +36,16 @@ namespace vmime
{
+fileAttachment::fileAttachment(const string& filename, const mediaType& type)
+{
+ m_type = type;
+
+ setData(filename);
+
+ m_encoding = encoding::decide(m_data);
+}
+
+
fileAttachment::fileAttachment(const string& filename, const mediaType& type, const text& desc)
{
m_type = type;
@@ -48,7 +58,7 @@ fileAttachment::fileAttachment(const string& filename, const mediaType& type, co
fileAttachment::fileAttachment(const string& filename, const mediaType& type,
- const encoding& enc, const text& desc)
+ const text& desc, const encoding& enc)
{
m_type = type;
m_desc = desc;