in reply to multiple CC using sendmail

First of all, IIRC, sendmail does not support separating adresses with ";", you need to use ",".

Also "It just does not work" is not a good description of what's going wrong, so I can't really help you there. See also How do I post a question effectively?. Especially helpful would be: what does open(MAIL,"|/usr/sbin/sendmail -t") or fatal("..."); print to stderr?

See also http://perldoc.perl.org/perlfaq9.html#How-do-I-send-mail%3f which describes how to send mail from perl using sendmail.

Also also: there's no need to use the cumbersome array assignment to create the message. You can use "here docs" instead, for example:

my $msg = <<"ENDMSG"; To: $email From: $from Bcc: support\@mysite.com MIME-Version: 1.0 Content-Type: text/html; charset=us-ascii Subject: $subject $theMessage ENDMSG # continue here and print $msg to sendmail

Replies are listed 'Best First'.
Re^2: multiple CC using sendmail
by Hammy (Scribe) on Jun 26, 2007 at 02:14 UTC
    Thanks for your quick response. I appologize for not being specific about sending the emails. What I meant by does not work is:

    When separating by ',' - no emails are sent.

    Now I must clarify. I made your suggestion to use comma in the Bcc and it sent the email to everyone I asked it to. Great. So I went back to my original need which is multiple people in the To: field and it does not send an email to anyone in the To: field. So I had two people in the To: field and two people in the Bcc: field. Both Bcc: people arrived, neither To: field arrived.

    Thanks again.