Blind copy with sendmail 
Author Message
 Blind copy with sendmail

Hello,

I have the following code in my script:

open (MAIL, "|/usr/lib/sendmail -t") || &ErrorMessage("error opening
sendmail") ;


print MAIL "Subject: Something\n\n" ;
print MAIL "$my_mail,\n\n" ;
close (MAIL) ;

Is it possible to send also a copy or even a blind copy?

Thanx, Menno.



Wed, 18 Jun 1902 08:00:00 GMT  
 Blind copy with sendmail

print MAIL "Bcc: $bcc\n";

Flint



Quote:
>Hello,

>I have the following code in my script:

>open (MAIL, "|/usr/lib/sendmail -t") || &ErrorMessage("error opening
>sendmail") ;


>print MAIL "Subject: Something\n\n" ;
>print MAIL "$my_mail,\n\n" ;
>close (MAIL) ;

>Is it possible to send also a copy or even a blind copy?

>Thanx, Menno.



Wed, 18 Jun 1902 08:00:00 GMT  
 Blind copy with sendmail
Thanx.



Quote:

> print MAIL "Bcc: $bcc\n";

> Flint



Wed, 18 Jun 1902 08:00:00 GMT  
 Blind copy with sendmail

Quote:

>Hello,

>I have the following code in my script:

>open (MAIL, "|/usr/lib/sendmail -t") || &ErrorMessage("error opening
>sendmail") ;

That error message is misleading.

If sendmail has a problem &ErrorMessage will NOT be called.

You should have a look at the Perl FAQ, part 8:

   "Why doesn't open() return an error when a pipe open fails?"

Quote:
>close (MAIL) ;

Better check the return value from close() too when open()ed
with a pipe.

Quote:
>Is it possible to send also a copy or even a blind copy?

Yes. Use the print() function to print the appropriate header(s).

--
    Tad McClellan                          SGML consulting

    Fort Worth, Texas



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Does anyone know how to add blind carbon copies (Bcc's) to Sendmail?

2. Blind Vigilantes

3. newbie-perl or why am i blind to this simple

4. Blind Vigilantes

5. Perl for the Blind

6. Blind Vigilantes

7. Syntax blind-spot

8. Blind Vigilantes

9. keyboard input in BLIND MODE

10. I must be blind...

11. Regexp - I must be blind

12. Blind Vigilantes

 

 
Powered by phpBB® Forum Software