Top  Previous  Next

The Email object allows data local to FreeFlyer to be transmitted to an external user via email. Any combination of text and internal FreeFlyer data may be transmitted. An email can be sent from any point in the FreeFlyer Mission Sequence using the Send command. This functionality can be used to inform an on-call operator that a product has been generated or that a spacecraft anomaly has occurred. A connection to an email server is required to use this functionality.



Creating an Email Object        

Create and edit an Email object through the Object Browser, as seen in the image, or through FreeFlyer script as shown below.


Email Object Editor

Email Object Editor


Email myEmail;


// Server used to send

myEmail.MailServer = "";


// Configure "To" and "From" addresses

myEmail.Recipients = ",";

myEmail.From = "";


// Subject line

myEmail.Subject = "Updated Data Products from FreeFlyer";


// Password Authentication

myEmail.DoAuthenticate = 1;

myEmail.LoginID = "";

myEmail.LoginPassword = "p4ssw0rd";

myEmail.Port = 25;



Sending Email

After creating the Email object, an email may be sent using the Send command, either from the Send command editor as shown in the image or using the script lines shown below.



Send "Orbit Determination is experiencing an error" to myEmail;


// --or--


Send "Spacecraft Position is: ", sc.X, sc.Y, sc.Z to myEmail attaching "Ephemeris1.ephem";


A connection to an email account must be available in order to use this function.


FreeFlyer allows the user to send Variables, Strings, Arrays and StringArrays to the Email object.



Automatic Email

When mail is repeatedly sent to a common list of recipients it may be advantageous to archive the email object to a file using the Put command and retrieve it when needed with a Get command, rather than recreating the email object each time. For example:


// Configure the email and save it to a file using the Put command from one Mission Plan

Put Email1 to "Email1.FFObjectFile";


// Retrieve the email from the file using the Get command from another Mission Plan

Email Email1;

Get Email1 from "Email1.FFObjectFile";


Once the email object is retrieved, any of the properties may be modified for your specific application using the syntax shown in the examples above.


Note: An email will be sent every time a Send command is encountered in the Mission Sequence. Placing an email "Send" command into a loop, such as a While statement, could result in a large number of emails being sent.



See Also

Email Properties and Methods

Send Command