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)
|
void MimeMessage::setSender(EmailAddress* e)
|
||||||
{
|
{
|
||||||
this->sender = e;
|
this->sender = e;
|
||||||
|
e->setParent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MimeMessage::addRecipient(EmailAddress* rcpt, RecipientType type)
|
void MimeMessage::addRecipient(EmailAddress* rcpt, RecipientType type)
|
||||||
@ -77,6 +78,8 @@ void MimeMessage::addRecipient(EmailAddress* rcpt, RecipientType type)
|
|||||||
recipientsBcc << rcpt;
|
recipientsBcc << rcpt;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rcpt->setParent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MimeMessage::addTo(EmailAddress* rcpt) {
|
void MimeMessage::addTo(EmailAddress* rcpt) {
|
||||||
|
@ -364,6 +364,7 @@ bool SmtpClient::sendMail(MimeMessage& email)
|
|||||||
// To (primary recipients)
|
// To (primary recipients)
|
||||||
for (it = email.getRecipients().begin(), itEnd = email.getRecipients().end();
|
for (it = email.getRecipients().begin(), itEnd = email.getRecipients().end();
|
||||||
it != itEnd; ++it)
|
it != itEnd; ++it)
|
||||||
|
{
|
||||||
|
|
||||||
sendMessage("RCPT TO:<" + (*it)->getAddress() + ">");
|
sendMessage("RCPT TO:<" + (*it)->getAddress() + ">");
|
||||||
waitForResponse();
|
waitForResponse();
|
||||||
|
Loading…
Reference in New Issue
Block a user