Philip S Tellis spewed into the ether: <snip>
The RCPT TO: does not decide what shows up in the To: header. The RCPT TO: is part of the envelope. The header needs to be set explicitly in the body of the mail:
To clarify the picture somewhat: The structure of a mail looks like this: SMTP Envelope Mail Header Mail body
Commands to port 25 form the SMTP envelope. The mail header and body parts form part of the data part of the SMTP transaction. For a full SMTP conversation sample (my comments are in /* */):
$telnet my.mail.server 25 /* Open Connection */ 220 my.mail.server HELO my.domain.name /* Introduce yourself */ 250 HELO my.mail.server mail from:me@my.domain.name /* Begin SMTP Envelope */ 250 Ok rcpt to:recipient@other.domain 250 Ok rcpt to:someone@third.domain 250 Ok Data /* End SMTP Envelope, begin mail headers */ 354 End data with <CR><LF>.<CR><LF> From: "Fake user" fake.user@dummy.domain /* Your mail client shows above for the from address */ To: "My recipient" recipient@other.domain /* Apparently the mail was sent here only */\ X-spammer: Make money fast spam Subject: Make money fast /* Subject */ /*This is a blank line that separates mail headers from the body, beginning on the next line */ This is not a spam mail . /* End of data */ 250 Ok: queued as message.id quit /* End of SMTP Session */ 221 bye $
Devdas Bhagat
------------------------------------------------------------ Shop Smart Compare Prices on Name-Brand Products from Name-Brand Stores!! http://www.smartshop.com/cgi-bin/main.cgi?ssa=4099