When sending emails by SMTP you specify [MAIL FROM:] and [RCPT TO:]
I'm doing this just fine using Rebex Secure Mail, and it's working well.
However, the SMTP protocol supports an additional email header of [TO:]. This allows me to send an email to freddy@bigmac.com, but it looks to Freddy like it was sent to freddy@cheeseburger.com.
Why do I want to do this? Well I am downloading email from a POP3 server and sending it on to a different SMTP server. So the POP3 message was originally sent to freddy@bigmac.com, and I am downloading it by pop3 from bigmac.com's pop3 server. I am then sending it to cheeseburger.com's SMTP server. So I have to tell the SMTP server that it's being sent to freddy@cheeseburger.com. But I want Freddy to see that it was originally sent to freddy@bigmac.com.
Sound confusing? Here's how I would do it using telnet:
TELNET mail.cheeseburger.com 25
EHLO
MAIL FROM: peter@applepie.com
RCPT TO: freddy@cheeseburger.com
DATA
TO: freddy@bigmac.com
SUBJECT: Hello Freddy, this is your friend Peter sending you a test email
Hello Freddy, this is the body text
.
In the above example, the email would DEFINITELY be delivered to the mailbox of freddy@cheeseburger.com, but if Freddy was using Outlook then Outlook would show the "TO:" field as being freddy@bigmac.com. Freddy therefore knows which of his email addresses Peter sent his message to.
Sorry, I'm probably not explaining this very well, and it might be sounding way more complicated that it actually is!
I am simply trying to determine how to distinguish between [RCPT TO:] (at the start of the communication) and [TO:] (as part of the DATA section of the communication).
Any help would be appreciated.
Many thanks,
Fork.