![]() ![]() ![]() # they are called $cmd_line_part_4_1 and $cmd_line_part_4_2 # The fourth part contains the different body and # $common_part_1, $common_part_2 and $common_part_3. # Both have a common part which consists of the variables # on the errors that may have happened we need to build # As there are two different kinds of emails depending ![]() # -f -to -subject "ScriptFTP error message" # to look like this (without the line breaks): # The blat command for sending an email is supposed # the system environment variable TEMP and appending the current ![]() # Build the log file path by retrieving Windows' temp path from $email_body2="Could not syncronize files" $email_body1="Could not connect to FTP server" # used in this example to send emails from within error message" We construct two different commands for calling Blat, one for each type of error, since the user should tell from the email what happened exactly and not be confused by a generic error message. Note that we first setup the way how Blat will be invoked. The following example script will send an email if it cannot connect to the FTP server or if the file synchronization fails. However, you can use any other mail program just by adjusting the EXEC call. The following examples use Blat, a free and tremendously useful command-line mail program for all kinds of batch jobs. We will rather use the EXEC command to call an external command-line program that will send the email. In ScriptFTP 4.4 and older there is no built-in command for sending emails because it is not needed. # Set the SMTP server Send the is the subject","this is the email body","C:\Users\Carlos\Desktop\scriptftp_log.txt") DOCUMENTATION TOPICS DOCUMENTATION TOPICS ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |