![]() |
SmtpdSocket::EmailAddress Class Reference#include <SmtpdSocket.h>
Detailed DescriptionDefinition at line 57 of file SmtpdSocket.h. Constructor & Destructor Documentation
Definition at line 59 of file SmtpdSocket.h. 00060 { 00061 std::string str = str_in; 00062 size_t i = str.find("<"); 00063 if (i != std::string::npos) 00064 str = str.substr(i + 1); 00065 i = str.find("@"); 00066 if (i != std::string::npos) 00067 { 00068 m_name = str.substr(0, i); 00069 str = str.substr(i + 1); 00070 i = str.find(">"); 00071 if (i != std::string::npos) 00072 str = str.substr(0, i); 00073 m_domain = str; 00074 } 00075 while (m_name.size() && m_name[m_name.size() - 1] == ' ') 00076 m_name.resize(m_name.size() - 1); 00077 while (m_domain.size() && m_domain[m_domain.size() - 1] == ' ') 00078 m_domain.resize(m_domain.size() - 1); 00079 while (m_name.size() && m_name[0] == ' ') 00080 m_name = m_name.substr(1); 00081 while (m_domain.size() && m_domain[0] == ' ') 00082 m_domain = m_domain.substr(1); 00083 m_top = m_domain; 00084 { 00085 for (size_t i = 0; i < m_domain.size(); i++) 00086 { 00087 if (m_domain[i] == '.') 00088 { 00089 m_sub = m_top; 00090 m_top = m_domain.substr(i + 1); 00091 } 00092 } 00093 } 00094 }
Member Function Documentation
Member Data Documentation
Definition at line 104 of file SmtpdSocket.h.
Definition at line 105 of file SmtpdSocket.h.
Definition at line 106 of file SmtpdSocket.h.
Definition at line 107 of file SmtpdSocket.h.
The documentation for this class was generated from the following file: |