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