Sample scripts are provided as-is with no warranty of fitness for a particular purpose. These scripts are solely intended to demonstrate techniques for accomplishing common tasks. Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.
Sometimes when sending emails you need to have an html body so that you can do layout or include images in your email. This can be done with the /htmlbody= and /embed= options to the CREATEMAIL and EMAIL commands.
The embed urls follow the form of cid:CID_0000000001@Robo-FTP where the number increments by one for each /embed= option.
1 ;; given the existance of 2 images files in the current working directory named 2 ;; Chrysanthemum.jpg and Desert.jpg 3 ;; This will send a formatted email containing the two images. 4 SET body = '<html><body><h1>This is a flower</h1><img src="cid:CID_0000000001@Robo-FTP' /> 5 SET body = body & '<h1>This is a desert</h1><img src="cid:CID_0000000002@Robo-FTP" /></body></html>' 6 CREATEMAIL "" "firstname.lastname@example.org" "Subject" "Text body." "" /htmlbody=body /embed="Chrysanthemum.jpg" /embed="Desert.jpg" 7 SENDMAIL "mail.nowhere.org" "No Reply" "email@example.com" /port=587