aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vmime/emailAddress.cpp39
-rw-r--r--src/vmime/path.cpp10
2 files changed, 11 insertions, 38 deletions
diff --git a/src/vmime/emailAddress.cpp b/src/vmime/emailAddress.cpp
index ed17f555..e6873803 100644
--- a/src/vmime/emailAddress.cpp
+++ b/src/vmime/emailAddress.cpp
@@ -596,27 +596,15 @@ void emailAddress::generateImpl(
}
- if (!domainPart.empty()) {
- os << localPart
- << "@"
- << domainPart;
-
- if (newLinePos) {
- *newLinePos = curLinePos
- + localPart.length()
- + 1 // @
- + domainPart.length();
- }
- } else {
- // this should only be true if m_useMyHostname is false and an address without
- // an `@` is encountered
-
- os << localPart;
-
- if (newLinePos) {
- *newLinePos = curLinePos
- + localPart.length();
- }
+ os << localPart
+ << "@"
+ << domainPart;
+
+ if (newLinePos) {
+ *newLinePos = curLinePos
+ + localPart.length()
+ + 1 // @
+ + domainPart.length();
}
}
@@ -710,13 +698,8 @@ const text emailAddress::toText() const {
text txt;
txt.appendWord(make_shared <vmime::word>(m_localName));
-
- if (!m_domainName.isEmpty()) {
- // this should only be skipped if m_useMyHostname is false and an address without
- // an `@` is encountered
- txt.appendWord(make_shared <vmime::word>("@", vmime::charsets::US_ASCII));
- txt.appendWord(make_shared <vmime::word>(m_domainName));
- }
+ txt.appendWord(make_shared <vmime::word>("@", vmime::charsets::US_ASCII));
+ txt.appendWord(make_shared <vmime::word>(m_domainName));
return txt;
}
diff --git a/src/vmime/path.cpp b/src/vmime/path.cpp
index a3aaff21..a672b22c 100644
--- a/src/vmime/path.cpp
+++ b/src/vmime/path.cpp
@@ -192,16 +192,6 @@ void path::generateImpl(
*newLinePos = curLinePos + 2;
}
- } else if (!m_localPart.empty() && m_domain.empty()) {
- // this should only be true if m_useMyHostname is false and an address without
- // an `@` is encountered
-
- os << "<" << m_localPart << ">";
-
- if (newLinePos) {
- *newLinePos = curLinePos + m_localPart.length() + 2;
- }
-
} else {
os << "<" << m_localPart << "@" << m_domain << ">";