Yes, I have a lot of work to do. Thanks for looking . Hut ----- Original Message ----- From: "Serge Knystautas" <[EMAIL PROTECTED]> To: "James Users List" <[EMAIL PROTECTED]> Sent: Friday, July 25, 2003 11:06 AM Subject: Re: How to Set InternetAddress Personal Name
> Hutson Carspecken wrote: > > I am forwarding e-mails into our company through a gateway e-mail server. I > > want to keep the original senders personal name, but I also need to attach > > the name of the proxy e-mail server. So, from this e-mail, I see that the > > sender is: "Serge Knystautas" <[EMAIL PROTECTED]>. I would like to > > change that so a person in our company receiving e-mail from you would see > > the following: > > > > "Serge Knystautas" <[EMAIL PROTECTED]> > > > > That is to say, the personal name would remain the original personal name, > > but the e-mail address would be the recipent's own "outward-facing" email > > address...the one which the original sender (in this example, yourself) used > > to reach the company employee. > > Ok, makes sense. > > > I am making headway with the required code and am somewhat close. Tell me > > what you think of this code snippet. > > > > String prevPersonalName; > > > > Mail myMail = new Mail(); > > prevPersonalName = origMail.getMessage().getFrom().getPersonal(); > > myMail.getMessage().setPersonal( prevPersonalName); > > I think this is just a typo, but I think you meant setPersonal on > myMail.getMessage().getFrom() (not getMessage()). > > I'm not sure why this isn't working for you... maybe it's some strange > issue where it's updating a copy of the message's From header. > > Overall though, I think you have a tough job ahead of you because of the > following: > a) creating a new message will be very hard because of the amount of > relevant headers you'd need to copy from the original to the copy. > b) modifying the original is hard because you also have to go sanitize > the Received headers, and possibly elsewhere as well. Otherwise someone > could see what your actual email address is. > > Actually, the more I read your idea, the more confused I get. Why would > you change the **FROM** of a message. "Serge Knystautas"'s address > stays the same... in fact the email address I put as the TO or CC would > stay the same because it already is the "outward-facing" address, > otherwise it wouldn't have reached your company employee. > > -- > Serge Knystautas > President > Lokitech >> software . strategy . design >> http://www.lokitech.com > p. 301.656.5501 > e. [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
