The Send Mail Node is used to send e-mails with data and files about the modeFRONTIER project. The files indicated in the Input File Nodes, Transfer File Nodes and Support File Nodes connected to this node will be sent in attachment to the mail. The Send Mail Node identifies a text file that you feed as a Mail Template to provide it with some data about the modeFRONTIER project and uses this file to compound the mail body. In such a manner, the mail body is dynamically generated at run-time, inserting into some fixed structure the values of one or more variables (input, output, buffer, or transfer variables). Through the template mail editor you can then specify the desired format for the mail, and the rules for inserting the values into its body.
Configuring a Send Mail node requires setting several parameters (ask to your e-mail Service Provider for information):
Name: the name that will be used throughout modeFRONTIER to identify the node. The name must be unique within the set of node names, and must follow the guidelines for node names.
Description: the node description will appear as tooltip when the mouse stops over the node in the Work Flow canvas.
From: the sender e-mail address (mandatory). Sometimes the SMTP Server is not reachable from an IP and/or a sender e-mail address which is not recognized by the SMTP Server. Ask to your e-mail Service Provider if you have this kind of problems.
To: the receiver e-mail address (mandatory). More than one receiver can be specified adding commas to divide the addresses.
Subject: a subject line that should pertain clearly to the email body (optional).
SMTP Address: a subject line that should pertain clearly to the email body (optional).
Security Protocol: the cryptographic protocol, which should provide secure communications with the SMTP Server.
SMTP Port: the port used by the SMTP Service for the communications with the clients.
SMTP Username: the username of the user's e-mail account (optional but reccomended).
SMTP Password: the password of the user's e-mail account (optional but reccomended).
Max Mail Number: maximum number of mails sended by this node during a Job session: if a mail sent make the Job session to exceed this parameter, this mail and all the others that will follow later will not be sent and a warning will be generated.
Min Mail Interval: minimum number of seconds between 2 mails sended by this node: if a mail sent exceeded this parameter, the mail will not be sent and a warning will be generated.
Max Mail Size: maximum mail size (with the attachments included) expressed in KB sended by this node: if a mail sent exceeded this parameter, the mail will not be sent and a warning will be generated.
Zip Attachment Files: if checked, all the files in attachment to this mail will be zipped in a single attachment file.
Request Notification: if checked, a flag for requesting a receiver notification when the mail is delivered is set in the mail header.
High Priority Message: if checked, a flag indicating an high priority mail is set in the mail header.
Timeout with SMTP Server: if differs from 0, the timeout of the connection with the SMTP server will be set by modeFRONTIER to the number of seconds indicated here.
The next step is then to specify the format for the mail template. To do this you need to first select the variables that you desire to drop in the input file (in the Data Input Connector section of the configuration panel). Then you must click on the button to open the template editor.
The first time you specify a file format for a given mail node, a file chooser dialog will pop-up, allowing you to select a text file to be used as a template.
When you select the file you can also specify the encoding to be used to open the file. Once you select the desired file, and the proper encoding, the input file template will appear in a text editor (a Template Input Editor). At this stage you can also specify the convention to be used for terminating lines within the script, and you can specify the encoding used for saving the template file, that it used also for the whole mail encoding.If everything works correctly, the mail is been sent to the SMTP Server and the exit value for the node is zero. If the mail exceeded the Send Mail limits (Max MailNumber, Min Mail Interval, Max Mail Size, Timeout), only a warning will be generated. Otherwise, one of the following values is returned:
| 912 | The job has been killed |
| 920 | The job was set-up incorrectly, and it was not possible to start it |
| 1001 | The mail has not be sent (general error) |
The Send Mail node input can be connected to one or more nodes. The connectable nodes are different for each connector. The process input connector can only be connected to the process output connector of nodes that belong to one of the following types:
The data input connector can be connected only to nodes that belong to one of the following types:
For each node belonging to one of the last four node types (i.e., for each node representing a design variable) that you connect, you must also indicate which parameter you want to set with the value. This requires specifying the parameter name.The Send Mail node output can be connected to one or more nodes, different for each connector. The process output connector can only be connected to the process input connector of nodes that belong to one of the following types:
The data output connector cannot be connected to other nodes.
The following error messages can be associated with a Pro/ENGINEER node:
| 260 | MISSING SENDMAIL FROM ADDRESS | No valid mail sender address has been defined |
| 261 | MISSING SENDMAIL TO ADDRESS | No valid receiver/receivers address/addresses have been defined |
| 262 | MISSING SENDMAIL SMTP ADDRESS | No valid SMTP Server Address has been defined |
| 263 | MISSING SENDMAIL TEMPLATE RULE | Some of the variables that enter into the node are not inserted into the file |
| 264 | MISSING SENDMAIL TEMPLATE FILE | No mail template file has been defined |
| 265 | SENDMAIL NODE NOT REACHEABLE | The Process Flow cannot be routed through the Send Mail node because an appropriate input connection is missing |
| 266 | NO EXIT PATH FOR SENDMAIL NODE | The Process Flow cannot be routed past the Send Mail node because an appropriate output connection is missing |
| 202 | INVALID EXIT CONDITION(S) | The conditions for the output nodes that support the Process Flow routing are not mutually exclusive |
Warnings
Once a connection between the SMTP Server and modeFRONTIERTM is estabilished, this connection can be closed only due to errors in the communication or SMTP server internal errors, so the process kill commands can't be able to close the sending mail process and modeFRONTIERTM may seem freezed until the mail delivery is not completed: at the end of the job, the mail may have been sent even if the error code is 912.