Revert another unauthorizied commit. I wonder what's up today.

I think it is very good, if the reciever knows, that the mail was redirected.
Otherwise this might even end up in legal issues, because someone pretends to be
someone else.

svn path=/trunk/kdenetwork/kmail/; revision=101677
wilder-work
Michael Haeckel 25 years ago
parent 1ea3c09114
commit cb06a0be06
  1. 11
      kmsender.cpp

@ -176,6 +176,17 @@ bool KMSender::send(KMMessage* aMsg, short sendNow)
kernel->outboxFolder()->open();
aMsg->setStatus(KMMsgStatusQueued);
// Handle redirections
QString f = aMsg->headerField("X-KMail-Redirect-From");
if(f.length() > 0) {
QString idStr = aMsg->headerField("X-KMail-Identity");
KMIdentity ident( idStr.isEmpty() ? i18n( "Default" ) : idStr );
ident.readConfig();
aMsg->setFrom(f + QString(" (by way of %1 <%2>)").
arg(ident.fullName()).arg(ident.emailAddr()));
}
rc = kernel->outboxFolder()->addMsg(aMsg);
if (rc)
{

Loading…
Cancel
Save