{
    "mode": "man",
    "parameter": "send",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/send/1/json",
    "generated": "2026-06-14T08:03:14Z",
    "synopsis": "send [-help] [-version] [-alias aliasfile] [-draft] [-draftfolder +folder] [-draftmessage\nmsg] [-nodraftfolder] [-filter filterfile] [-nofilter] [-format | -noformat] [-forward |\n-noforward] [-mime | -nomime] [-msgid | -nomsgid] [-messageid localname | random] [-push\n| -nopush] [-split seconds] [-verbose | -noverbose] [-watch | -nowatch] [-mts smtp |\nsendmail/smtp | sendmail/pipe] [-sendmail program] [-server servername] [-port port-\nname/number] [-sasl] [-nosasl] [-saslmech mechanism] [-authservice service] [-snoop]\n[-user username] [-tls] [-initialtls] [-notls] [-certverify] [-nocertverify] [-width\ncolumns] [file ...]",
    "sections": {
        "NAME": {
            "content": "send - send an nmh message\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "send [-help] [-version] [-alias aliasfile] [-draft] [-draftfolder +folder] [-draftmessage\nmsg] [-nodraftfolder] [-filter filterfile] [-nofilter] [-format | -noformat] [-forward |\n-noforward] [-mime | -nomime] [-msgid | -nomsgid] [-messageid localname | random] [-push\n| -nopush] [-split seconds] [-verbose | -noverbose] [-watch | -nowatch] [-mts smtp |\nsendmail/smtp | sendmail/pipe] [-sendmail program] [-server servername] [-port port-\nname/number] [-sasl] [-nosasl] [-saslmech mechanism] [-authservice service] [-snoop]\n[-user username] [-tls] [-initialtls] [-notls] [-certverify] [-nocertverify] [-width\ncolumns] [file ...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "send will cause each of the specified files to be delivered to each of  the  destinations  in\nthe “To:”, “cc:”, “Bcc:”, “Dcc:”, and “Fcc:” fields of the message.  If send is re-distribut‐\ning a message, as invoked from dist, then the corresponding “Resent-xxx” fields are  examined\ninstead.\n\nBy  default,  send  uses the program post to do the actual delivery of the messages, although\nthis can be changed by defining the postproc profile component.  Most of the features attrib‐\nuted to send are actually performed by post.\n\nBefore  send  gives  the message to post for delivery, the message is processed by mhbuild to\nperform any necessary MIME encoding of the outgoing message.  This  can  be  changed  by  the\nbuildmimeproc profile component.  mhbuild is invoked with the -auto switch, so mhbuild direc‐\ntives are not processed by default.  See mhbuild(1) for more information.\n\nmhbuild will scan the message draft for a header named Attach.  The draft is converted  to  a\nMIME  message if one or more matches are found.  This conversion occurs before all other pro‐\ncessing.  The whatnow(1) man page describes the user interface for managing MIME  attachments\nvia this mechanism.\n\nThe  first  part  of  the  MIME message is the draft body if that body contains any non-blank\ncharacters.  The body of each Attach header field is interpreted as a  file  name,  and  each\nfile named is included as a separate part in the MIME message.\n\nDetermination  of  the  content MIME type inserted into the Content-Type header for each part\ndepends on how the nmh installation was configured.  If a program, such as file with a --mime\nor  -i option, was found that can specify the type of a file as a MIME type string, then that\nwill be used.  To determine if your nmh was so configured, run mhparam mimetypeproc  and  see\nif a non-empty string is displayed.\n\nIf your nmh was not configured with a program to specify a file type as a MIME string, then a\ndifferent method is used to determine the content-type string.  For file names with dot  suf‐\nfixes,  the  profile is scanned for a mhshow-suffix- entry for that suffix.  The content-type\nfor the part is taken from that profile entry if a match is found.  If a match is  not  found\nin  the  user profile, the mhn.defaults profile is scanned next.  If no match is found or the\nfile does not have a dot suffix, the content-type is text/plain if  the  file  contains  only\nASCII  characters  or application/octet-stream if it contains characters outside of the ASCII\nrange.  See mhshow(1) for more details and example syntax.\n\nEach attached MIME part contains a “Content-Description” header that includes  the  filename,\nand  adds a “Content-Disposition” header.  Here is an example of MIME part headers for an at‐\ntachment:\n\nContent-Type: text/plain; name=\"VERSION\"; charset=\"us-ascii\"\nContent-Description: VERSION\nContent-Disposition: attachment; filename=\"VERSION\"\n\nSee mhbuild(1) for explanation of how the Content-Disposition value is selected.\n\nIf -push is specified, send will detach itself from the user's terminal and perform  its  ac‐\ntions  in  the background.  If push'd and the draft can't be sent, then an error message will\nbe sent (using the mailproc) back to the user.  If -forward is given,  then  a  copy  of  the\ndraft  will be attached to this failure notice.  Using -push differs from putting send in the\nbackground because the output is trapped and analyzed by nmh.\n\nIf -verbose is specified, send will indicate the interactions occurring  with  the  transport\nsystem,  prior  to actual delivery.  If -watch is specified send will monitor the delivery of\nlocal and network mail.  Hence, by specifying both switches, a large  detail  of  information\ncan be gathered about each step of the message's entry into the transport system.\n\nThe -draftfolder +folder and -draftmessage msg switches invoke the nmh draft folder facility.\nThis is an advanced (and highly useful) feature.  Consult the mh-draft(5) man page  for  more\ninformation.\n\nIf  -split is specified, send will split the draft into one or more partial messages prior to\nsending.  This makes use of the MIME features in nmh.  Note however that if send  is  invoked\nunder  dist,  then  this  switch is ignored -- it makes no sense to redistribute a message in\nthis fashion.  Sometimes you want send to pause after posting a  partial  message.   This  is\nusually  the  case when you are running sendmail and expect to generate a lot of partial mes‐\nsages.  The argument to -split tells it how long to pause between postings.\n\nsend with no file argument will query whether the draft is the intended file, whereas  -draft\nwill  suppress this question.  Once the transport system has successfully accepted custody of\nthe message, the file will be renamed with a site-dependent prefix (usually a  comma),  which\nallows  it  to be retrieved until the next draft message is sent.  If there are errors in the\nformatting of the message, send will abort with a (hopefully) helpful error message.\n\nIf a “Bcc:” field is encountered, its addresses will be used for  delivery,  and  the  “Bcc:”\nfield will be removed from the message sent to sighted recipients.  The blind recipients will\nreceive an entirely new message with a minimal set of headers. The body of this  new  message\nwill  contain a copy of the message sent to the sighted recipients, either marked up with the\nindicator text \"Blind-Carbon-Copy\" or encapsulated as a MIME digest.\n\nIf a “Dcc:” field is encountered and the sendmail/pipe mail transport method is not  in  use,\nits  addresses  will be used for delivery, and the “Dcc:” field will be removed from the mes‐\nsage.  The blind recipients will receive exactly the same message as the sighted  recipients.\n*WARNING* Recipients listed in the “Dcc:” field receive no explicit indication that they have\nreceived a “blind copy”.  This can cause blind recipients to inadvertently reply  to  all  of\nthe  sighted  recipients  of the original message, revealing that they received a blind copy.\nOn the other hand, since a normal reply to a message sent via a “Bcc:” field will generate  a\nreply  only  to  the sender of the original message, it takes extra effort in most mailers to\nreply to the included message, and so would usually only be done deliberately, rather than by\naccident.\n\nIf  the  sendmail/pipe mail transport method is used, then messages containing a “Dcc:” field\nare rejected.\n\n\nIf -filter filterfile is specified, then this copy is filtered (re-formatted) by mhl prior to\nbeing  sent to the blind recipients.  Alternately, if you specify the -mime switch, then send\nwill use the MIME rules for encapsulation.\n\nPrior to sending the message, the “Date: now” field will be appended to the  headers  in  the\nmessage.   If  -msgid is specified, then a “Message-ID:” field will also be added to the mes‐\nsage.\n\nThe -messageid switch selects the style used for the part appearing  after  the  @  in  “Mes‐\nsage-ID:”, “Resent-Message-ID:”, and “Content-ID:” header fields.  The two acceptable options\nare localname (which is the default), and random.  With  localname,  the  local  hostname  is\nused.   With  random,  a random sequence of characters is used instead.  Note that the -msgid\nswitch must be enabled for this switch to have any effect.\n\nIf send is re-distributing a message (when invoked by dist), then “Resent-” will be prepended\nto each of these fields: “From:”, “Date:”, and “Message-ID:”.\n\nA  “From:”  field is required for all outgoing messages.  Multiple addresses are permitted in\nthe “From:” field, but a “Sender:” field is required in this  case.   Otherwise  a  “Sender:”\nfield is optional.\n\nIf  a message with multiple “From:” addresses does not include a “Sender:” field but does in‐\nclude an “Envelope-From:” field, the “Envelope-From:” field  will  be  used  to  construct  a\n“Sender:” field.\n\nWhen  using  SMTP for mail submission, the envelope-from used for the SMTP transaction is de‐\nrived from the  “Envelope-From:”  field.   If  no  “Envelope-From:”  field  is  present,  the\n“Sender:” field is used.  If neither the “Envelope-From:” nor the “Sender:” field is present,\nthe “From:” field is used.  When “Envelope-From:” appears in a message  it  will  be  removed\nfrom the final outgoing message.\n\nBy  using  the  -format switch, each of the entries in the “To:” and “cc:” fields will be re‐\nplaced with “standard” format entries.  This standard format is designed to be usable by  all\nof  the  message handlers on the various systems around the Internet.  If -noformat is given,\nthen headers are output exactly as they appear in the message draft.\n\nIf an “Fcc: folder” is encountered, the message will be copied to the  specified  folder  for\nthe  sender  in  the  format in which it will appear to any non-Bcc receivers of the message.\nThat is, it will have the appended fields and field reformatting.  The “Fcc:” fields will  be\nremoved from all outgoing copies of the message.\n\nBeware  that  if an “Fcc:” with one or more folders is present but none of the folders exist,\nand the default fileproc and postproc are in use, then refile will prompt the user to  create\nthe  folder(s) if -push is not specified.  If all responses are negative, or creation of each\nfolder fails, or -push is specified, the message will not be copied to any folder and will be\nremoved by post.  With the default refile switches, the message draft will be renamed accord‐\ning to the specification of its -nolink switch.\n\nBy using the -width columns switch, the user can direct send as to how long  it  should  make\nheader lines containing addresses.\n\nThe mail transport system default is provided in /etc/nmh/mts.conf but can be overridden here\nwith the -mts switch.\n\nIf nmh is using as its mail transport system sendmail/pipe, the -sendmail switch can be  used\nto override the default sendmail program.\n\nIf  nmh is using the SMTP MTA, the -server and the -port switches can be used to override the\ndefault mail server (defined by the /etc/nmh/mts.conf servers entry).  The -snoop switch  can\nbe  used to view the SMTP transaction.  (Beware that the SMTP transaction may contain authen‐\ntication information either in plaintext or  easily  decoded  base64.)   If  -sasl  -saslmech\nxoauth2 is used, the HTTP transaction is also shown.\n\nIf  nmh  has  been compiled with SASL support, the -sasl and -nosasl switches will enable and\ndisable the use of SASL authentication with the SMTP MTA.  Depending on  the  SASL  mechanism\nused, this may require an additional password prompt from the user (but the netrc file can be\nused to store this password, as described in the  mh-profile(5)  man  page).   The  -saslmech\nswitch can be used to select a particular SASL mechanism, and the -user switch can be used to\nselect a authorization userid to provide to SASL other than  the  default.   The  credentials\nprofile entry in the mh-profile(5) man page describes the ways to supply a username and pass‐\nword.\n\nIf SASL authentication is successful, nmh will attempt to negotiate a security layer for ses‐\nsion  encryption.  Encrypted data is labelled with `(encrypted)' and `(decrypted)' when view‐\ning the SMTP transaction with the -snoop switch; see the post man page description of  -snoop\nfor its other features.\n\nIf  nmh  has  been compiled with OAuth support, the -sasl and -saslmech xoauth2 switches will\nenable OAuth authentication.  The -user switch must be used, and  the  username  must  be  an\nemail  address  the  user  has for the service, which must be specified with the -authservice\nservice switch.  Before using OAuth authentication, the user must authorize  nmh  by  running\nmhlogin  and  grant  authorization to that account.  See the mhlogin(1) man page for more de‐\ntails.\n\nIf nmh has been compiled with TLS support, the -tls and -initialtls switches will require the\nnegotiation  of  TLS  when connecting to the SMTP MTA.  The -tls switch will negotiate TLS as\npart of the normal SMTP protocol using the STARTTLS command.  The -initialtls will  negotiate\nTLS  immediately  after  the connection has taken place, before any SMTP commands are sent or\nreceived.  Encrypted data is labelled with `(tls-encrypted)' and `(tls-decrypted)' when view‐\ning  the SMTP transaction with the -snoop switch; see the post man page description of -snoop\nfor its other features.  The -notls switch will disable all attempts to negotiate TLS.\n\nIf port 465 is specified and none of the TLS switches were enabled, -initialtls will  be  im‐\nplied if TLS support was compiled in.  Though port 465 for SMTPS (SMTP over SSL) was deregis‐\ntered by IANA in 1998, it is still used for that service.\n\nWhen using TLS the default is to verify the remote certificate and  SubjectName  against  the\nlocal trusted certificate store.  This can be controlled by the -certverify and -nocertverify\nswitches.  See your OpenSSL documentation for more information on certificate verification.\n\nThe files specified by the profile entry “Aliasfile:” and any additional alias files given by\nthe -alias aliasfile switch will be read (more than one file, each preceded by -alias, can be\nnamed).  See mh-alias(5) for more information.\n",
            "subsections": [
                {
                    "name": "Selection based on sender address: sendfrom",
                    "content": "One or more sendfrom profile components can be used to select a  mail  server  address,  mail\nserver  port, or any other switch that can be supplied to post.  It works by first looking at\nthe sender address and domain name in the message draft, as described below.  It  then  looks\nfor  a corresponding profile entry, which contains the post switches.  To enable, add profile\nentries of the form:\n\nsendfrom-address/domain name: post switches\n\nThe email address is extracted from the Envelope-From:  header, if  not  blank,  the  Sender:\nheader,  or  the From: header line in the message draft.  Multiple profile entries, with dif‐\nferent email addresses or domain names, are supported.  This  allows  different  switches  to\npost,  such  as  -user, to be associated with different email addresses.  If a domain name is\nused, it matches all users in that domain.\n\nHere is an example profile entry using OAuth for an account hosted by gmail:\n\nsendfrom-gmailaddress@example.com: -sasl -saslmech xoauth2\n-authservice gmail -tls -server smtp.gmail.com\n-user gmaillogin@example.com\n\n(Indentation indicates a continued line, as supported in MH profiles.)  The username need not\nbe  the  same  as the sender address, which was extracted from the appropriate header line as\nnoted above.\n\nHere are example profile entries that use an nmh credentials file:\n\ncredentials: file:nmhcreds\nsendfrom-sendgridaddress@example.com: -sasl -tls\n-server smtp.sendgrid.net\nsendfrom-outbound.att.net: -sasl -initialtls\n-server outbound.att.net -port 465\nsendfrom-fastmail.com: -initialtls -sasl -saslmech LOGIN\n-server smtps-proxy.messagingengine.com -port 80\n\nwhere nmhcreds is in the user's nmh directory (from the Path profile component) and contains:\n\nmachine smtp.sendgrid.net\nlogin sendgridlogin@example.com\npassword\nmachine outbound.att.net\nlogin attlogin@example.com\npassword\nmachine smtps-proxy.messagingengine.com\nlogin fastmaillogin@example.com\npassword\n\nFor more information on authentication to mail servers, see the mhlogin(1) man page for OAuth\nservices, and mh-profile(5) man page for login credentials.\n"
                }
            ]
        },
        "FILES": {
            "content": "$HOME/.mhprofile          The user profile\n",
            "subsections": []
        },
        "PROFILE COMPONENTS": {
            "content": "Path:                To determine the user's nmh directory\nDraft-Folder:        To find the default draft-folder\nAliasfile:           For a default alias file\nSignature:           To determine the user's mail signature\nmailproc:            Program to post failure notices\npostproc:            Program to post the message\nsendfrom-address:    Switches to post for sender address\nsendfrom-domain:     Switches to post for sender domain name\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "comp(1),  dist(1),  file(1), forw(1), mhbuild(1), mhparam(1), mhlogin(1), refile(1), repl(1),\nwhatnow(1), mh-alias(5), mh-profile(5), mh-tailor(5), post(8)\n",
            "subsections": []
        },
        "DEFAULTS": {
            "content": "`file' defaults to <mh-dir>/draft\n`-alias' defaults to /etc/nmh/MailAliases\n`-nodraftfolder'\n`-nofilter'\n`-format'\n`-forward'\n`-nomime'\n`-nomsgid'\n`-messageid localname'\n`-nopush'\n`-noverbose'\n`-nowatch'\n`-width 72'\n`-certverify'\n",
            "subsections": []
        },
        "CONTEXT": {
            "content": "None\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Under some configurations, it is not possible  to  monitor  the  mail  delivery  transaction;",
            "subsections": [
                {
                    "name": "-watch",
                    "content": "Using -split 0 doesn't work correctly.\n\n\n\nnmh-1.7.1                                    2017-05-11                                    SEND(1mh)"
                }
            ]
        }
    },
    "summary": "send - send an nmh message",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "comp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/comp/1/json"
        },
        {
            "name": "dist",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/dist/1/json"
        },
        {
            "name": "file",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/file/1/json"
        },
        {
            "name": "forw",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/forw/1/json"
        },
        {
            "name": "mhbuild",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mhbuild/1/json"
        },
        {
            "name": "mhparam",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mhparam/1/json"
        },
        {
            "name": "mhlogin",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mhlogin/1/json"
        },
        {
            "name": "refile",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/refile/1/json"
        },
        {
            "name": "repl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/repl/1/json"
        },
        {
            "name": "whatnow",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/whatnow/1/json"
        },
        {
            "name": "mh-alias",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mh-alias/5/json"
        },
        {
            "name": "mh-profile",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mh-profile/5/json"
        },
        {
            "name": "mh-tailor",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mh-tailor/5/json"
        },
        {
            "name": "post",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/post/8/json"
        }
    ]
}