Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We use bmail.exe for a lot of automated work and sometimes we'd like to use a cc: but the app doesn't provide an input parameter for one.

However it does allow you to set the body and subject so is there some way to sneak a cc: into the subject or body so that it shows up?

Bmail has the following options -

C:\>bmail /?

Command Line SMTP Emailer V1.07
Copyright(C) 2002-2004 Craig.Peacock@beyondlogic.org
Usage: bmail [options]
        -s    SMTP Server Name
        -p    SMTP Port Number (optional, defaults to 25)
        -t    To: Address
        -f    From: Address
        -b    Text Body of Message (optional)
        -h    Generate Headers
        -a    Subject (optional)
        -m    Filename (optional) Use file as Body of Message
            -c    Prefix above file with CR/LF to separate body from header
            -d    Debug (Show all mail server communications)

So I'm wondering if I don't use the -c if I can add in the cc: into the header via the body? And how would that be done? I would assume a bcc: would also be possible using this method.

Anybody ever do this? Thanks

share|improve this question
add comment

migrated from stackoverflow.com Sep 13 '11 at 10:30

This question came from our site for professional and enthusiast programmers.

1 Answer

The Subject of an email is a special part of the Body of the email, while the CC and BCC fields are part of the Header. You can't fake that a part of the Body should become part of the Header, since if that was possible, you could accidently send emails to email addresses that you were just discussing as part of the email.
See the RFC for further details.

The best option would probably be to look for a replacement of the tool with one that does support CC or BCC, or, since this is SO, a site for developers, it is quite easy to write a simple command line app to send simple emails as long as you don't have to worry about attachments and MIME etc.

A quick look on google led me to Blat, which I remember reading about some other time. Blat is a Win32 command line utility that sends eMail using SMTP or post to usenet using NNTP.. The syntax page on that website mentions flags for both CC and BCC.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.