From 7eb74bbd3948309ac69649592d1b51d9f15bb306 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Tue, 29 May 2001 18:28:02 +0000 Subject: [PATCH] More fixes to e-mail handling --- golded3/gehdre.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/golded3/gehdre.cpp b/golded3/gehdre.cpp index 63c5229..d100afd 100644 --- a/golded3/gehdre.cpp +++ b/golded3/gehdre.cpp @@ -444,12 +444,22 @@ int EditHeaderinfo(int mode, GMsgHeaderView &view) { to_name = tmp_to_name; if(AA->isinternet()) { - strcpy(msg->to, *AA->Internetgate().name ? AA->Internetgate().name : msg->idest); + strcpy(msg->iorig, from_addr.c_str()); + strcpy(msg->to, to_name.c_str()); + if(to_addr.empty() and strchr(to_name.c_str(), '@')) + strcpy(msg->idest, to_name.c_str()); + else + strcpy(msg->idest, to_addr.c_str()); + strcpy(msg->iaddr, msg->idest); strcpy(msg->realby, msg->by); if(not *msg->realto and not strchr(msg->to, '@')) strcpy(msg->realto, msg->to); - strcpy(msg->iorig, from_addr.c_str()); - strcpy(msg->idest, to_addr.c_str()); + if(*AA->Internetgate().name) + strcpy(msg->to, AA->Internetgate().name); + else if(strlen(msg->idest) > 34) + strcpy(msg->to, "UUCP"); + else + strcpy(msg->to, msg->idest); if(*msg->realby and *msg->iorig) sprintf(msg->ifrom, "\"%s\" <%s>", msg->realby, msg->iorig); else