Creature of Configuration File |
Top Previous Next |
We will need a configuration file to address SmtpSend. The configuration file will contain server data, port number, sender’s email, receiver’s email, subject, and text body of the letter. By default, SmtpSend considers default.conf as a configuration file name, and the folder containing SmtpSend.exe as its folder. You can name and place the configuration file at your discretion. You may need several configuration files with different data set to send your emails. In our example, we use values by default, but we will also provide you with an example of an argument string with different name and configuration file folder. Ok, let us create the default.conf file in the inPhoto Capture PS folder where the SmtpSend.exe file is located.
Data in default.conf will be described under the JSON format. Please pay attention the JSON format does not support commenting. Let us take a look at all possible keys that may be indicated as settings: host: - host name or server IP-address Example: host: "smtp-mail.outlook.com", port: - port number/ To send emails without encryption, they use port 25, and port 587 or 465 to send emails with encryption. The port 25 is set by default. Example: port: 587, enableSSL: - encryption support. true means the encryption is active, false means the encryption is disabled. The by default value is false. Example: enableSSL: true, timeout: - server standby time. The value is set in milliseconds. The by default value is 100000 (100 seconds). Example: timeout: 30000, username: - your email Example: username: "inphoto_capture_ps@outlook.com", password: - your password Example: password: "inphoto2016", from: - sender's email Example: from: "inphoto_capture_ps@outlook.com", to: - addressees’ emails list. Use a comma as a separator. Example: to: "inphotoid@gmail.com", or to: "a@gmail.com, b@gmail.com, c@gmail.com", cc: - a copy; it contains addresses to which the email will be also sent. Use a comma as a separator in the address list. The addresses added to cc: will be visible for all conversation participants. Optionally. Example: cc: "d@gmail.com, f@gmail.com", bcc: - a blind copy; it contains addresses to which the email will be also sent, but in contrast to cc: the addresses in a blind copy are not visible for other conversation participants. Use a comma as a separator in the address list. Optionally. Example: bcc: "g@gmail.com, h@gmail.com", subject: - email subject Example: subject: "Your ID Photo", body: - email content Example: body: "We are happy to deliver your photos."
Our configuration file will have the following appearance:
|