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 email@example.com, but it looks to Freddy like it was sent to firstname.lastname@example.org.
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 email@example.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 firstname.lastname@example.org. But I want Freddy to see that it was originally sent to email@example.com.
Sound confusing? Here's how I would do it using telnet:
TELNET mail.cheeseburger.com 25
MAIL FROM: firstname.lastname@example.org
RCPT TO: email@example.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 firstname.lastname@example.org, but if Freddy was using Outlook then Outlook would show the "TO:" field as being email@example.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.