News Products Updates Support EmailDLL Manual FAQ Debug DocBox Contacts Company Site Map |
EmailDLL Online ManualExample of the Javascript Email class Email Class Properties Methods
The following is an example of sending a simple email message using the class. It doesn't show all possible uses of all the methods or properties. Compare this with the same message sent directly accessing the DLL
#INCLUDE email100.js with(this.EM = new Email()) { var ErrVal = Create(this); if (ErrVal >= 0) { SetDebugOn() SetServer("mail.mycompany.com"); SetFrom('"Jimmy Johannsen" <jj@mycompany.com>"); ClearRecipients(); AddRecipient("myfriend@mycompany.com, myboss@mycompany.com"); ClearCC(); AddCC("hr@mycompany.com"); SetSubject("My vacation"); ClearMessage(); AddMessageLine("Joe and Bob:"); AddMessageLine(" "); AddMessageLine("As you know, my vacation starts tomorrow."); AddMessageLine("I will be in Tahiti for two weeks, in "); AddMessageLine("Aruba for two weeks, and in Cancun for "); AddMessageLine("a month. Please do all my work for me while"); AddMessageLine("I lounge in the sun. Ha!"); AddMessageLine(" "); AddMessageLine("Warm Regards,"); AddMessageLine(" "); AddMessageLine("Jimmy 'the lobster' Johannsen"); ErrVal = SendMessage(); if (ErrVal < 0) { this.EmailErrorMessage = GetErrorString(ErrVal); } FreeEmail(); } else { this.EmailErrorMessage = GetErrorString(ErrVal); } } |