MCPcopy Create free account
hub / github.com/acl-dev/acl / send_envelope

Method send_envelope

lib_acl_cpp/src/smtp/smtp_client.cpp:84–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool smtp_client::send_envelope(const mail_message& message)
85{
86 if (!open()) {
87 return false;
88 }
89 if (!get_banner()) {
90 return false;
91 }
92 if (!greet()) {
93 return false;
94 }
95
96 const char* user = message.get_auth_user();
97 const char* pass = message.get_auth_pass();
98 if (user && pass && !auth_login(user, pass)) {
99 return false;
100 }
101
102 const rfc822_addr* from = message.get_from();
103 if (from == NULL) {
104 logger_error("from null");
105 return false;
106 }
107 if (!mail_from(from->addr)) {
108 return false;
109 }
110 return to_recipients(message.get_recipients());
111}
112
113bool smtp_client::open(void)
114{

Callers 1

send_mailFunction · 0.80

Calls 2

openFunction · 0.85
mail_fromFunction · 0.85

Tested by

no test coverage detected