Just like that. Thanks for demystifying that for me.
|---------+----------------------------> | | "George | | | Schlossnagle" | | | <[EMAIL PROTECTED]| | | m> | | | | | | 12/04/2002 03:50 | | | PM | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------| | | | To: [EMAIL PROTECTED] | | cc: [EMAIL PROTECTED] | | Subject: Re: cc and bcc in Net::SMTP | >--------------------------------------------------------------------------------------------------------------| the Net::SMTP methods implement the SMTP protocol. Net::SMTP::to (and cc and bcc) simply set the data to be passed as a RCPT TO: command. This set's the envelope recipient on a mail, which is how your mta (and others) know who the mail is going to. cc: and bcc: (and things like Date: Message-ID: Subject:. etc.) are body headers. They appear in the body of the mail but are not used for routing information. So these should be done like: $smtp = Net::SMTP->new('mailhost'); $smtp->mail('[EMAIL PROTECTED]'); # set's the envelope from address via the MAIL FROM: protocol directive $smtp->to('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', '[EMAIL PROTECTED]'); # sets the envelope recipient for routing purposes via RCPT TO: directive $data = "Subject: This is a test To: you\@yourdomain.com cc: bob\@bobs.com This is the body of my mail"; $smtp->data($data); Now you have you as the To: addressee, bob as the cc: and jill is bcc'd. On Wednesday, December 4, 2002, at 03:29 PM, [EMAIL PROTECTED] wrote: > Hi, > > The 'cc' and 'bcc' methods in Net::SMTP seem to simply alias the 'to' > method. How do I actually 'cc' and 'bcc' in Net::SMTP? I tried > putting > these in the DATA area (though it doesn't really make sense to me to > do it > that way). I even looked through RFC 822 and 2821 for hints... but I > guess I'm not very good at making sense of RFCs. > > Any help appreciated. > > Thanks, > Peter > > > > > > -- > 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] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]