Issue #50 - fix memory leaks
This commit is contained in:
parent
6b676827fe
commit
5fc59c0863
@ -61,6 +61,7 @@ void MimeMessage::setContent(MimePart *content) {
|
||||
void MimeMessage::setSender(EmailAddress* e)
|
||||
{
|
||||
this->sender = e;
|
||||
e->setParent(this);
|
||||
}
|
||||
|
||||
void MimeMessage::addRecipient(EmailAddress* rcpt, RecipientType type)
|
||||
@ -77,6 +78,8 @@ void MimeMessage::addRecipient(EmailAddress* rcpt, RecipientType type)
|
||||
recipientsBcc << rcpt;
|
||||
break;
|
||||
}
|
||||
|
||||
rcpt->setParent(this);
|
||||
}
|
||||
|
||||
void MimeMessage::addTo(EmailAddress* rcpt) {
|
||||
|
@ -364,6 +364,7 @@ bool SmtpClient::sendMail(MimeMessage& email)
|
||||
// To (primary recipients)
|
||||
for (it = email.getRecipients().begin(), itEnd = email.getRecipients().end();
|
||||
it != itEnd; ++it)
|
||||
{
|
||||
|
||||
sendMessage("RCPT TO:<" + (*it)->getAddress() + ">");
|
||||
waitForResponse();
|
||||
|
Loading…
Reference in New Issue
Block a user