﻿# EMAILX Parameters


| **Parameter** | **I/O** | **Description** |
|------|------|------|
| [Opflags](opflags.md) | in | Operation flags |
| [Cfgfile](cfgfile.md) | in | Name of configuration file |
| [To](to_emailx.md) | in | Address of recipient(s) |
| [Header](header_emailx.md) | in | Header fields |
| [Body](body_emailx.md) | in | Text of message |
| [Status](status_emailx.md) | out | Return code |
| [From](from_emailx.md) | in | Email address of sender |
| [Attachments](attachments_emailx.md) | in | Attachments |
| signature | in | DevPPN or native filespec to be appended to bottom of message body. Like _body_, _signature_ can also contain the actual text rather than a filename. See note below. |
| errmsg | out | If present, will receive a (possibly) useful text string if STATUS # 0 (elaborating on the error condition.). |
| socket | in/out | Ignored on input unless you use _opflags _to avoid opening and closing the SMTP session for each message; in which case it receives the socket # of the session on the open call and must be passed to all the subsequent calls. Note that you must manually close the socket if you use the EMF\_LEAVEOPEN option. |
| server | in | Name or IP address of the SMTP server. (append :<port> if not using port 25). See note below. |
| host | in | Name to identify your domain to the SMTP server in the initial protocol exchange with the SMTP server. See note below.  |
| username | in | Overrides the _username_ field in the configuration file to specify the user name needed to authenticate with the SMTP server. If _username_ and _password_ are both specified (and not blank) and no AUTH mode was specified, AUTH = AUTO is used automatically. |
| password | in | Overrides the _password _field in the configuration file to specify the password needed to authenticate with the SMTP server. If _username_ and _password_ are both specified (and not blank) and no AUTH mode was specified, AUTH = AUTO is used automatically. Note that the password may be specified in encrypted form (provided it was encrypted with MX\_PWCRYPT). In the case of AUTH = XOAUTH2, the password should be the access token. |




Note that if values for _signature_, _server_ and _host_ are not specified explicitly, the values for those parameters will be taken from the configuration file. If no _host_ is provided, we use nothing, which may lead to your mail being rejected, or possibly sent with a warning that it comes from an unidentified source.