Has anyone been able to do an Email Capture Plugin...
# suitescript
d
Has anyone been able to do an Email Capture Plugin with SS2.x? I can get the script to recognize but it throws an error with everything I try, even on the first log statement.
Copy code
/**
 * @NApiVersion 2.0
 * @NScriptType emailcaptureplugin
 * @NModuleScope SameAccount
 *
 * @description Email Capture using SS2.X
 */

define([],
    function () {

        function process(email) {
            log.debug('EMAIL');
            log.debug('getFrom',email.getFrom());
        }

        return {
            process: process
        };
    });
c
Are they different to normal script files? By that, I mean do you not need to import
N/log
?
d
Email plugins are typically SS1.0. Yes, it's a normal script file.
n
I wasn't aware you could write an email plugin with SS2, that's interesting
I see no examples of email plugins in help that are 2.x In fact the "SuiteScript 2.x Script Types" in help makes no mention of them... 🧐
d
Correct. However, I've been told it can be done.
n
Ah, sounds like you need to speak to whoever told you it's possible... And report back ☺️
e
Are they different to normal script files? By that, I mean do you not need to import N/log ?
N/log
and
N/util
are always imported and do not need to be explicitly imported
r
I am also in the understanding the email capture plugins are only 1.0
c
Email capture plugin only supports for 1.0 version