Script and Classes forum

If you don't like something about the forum or site, post it here and we will consider it. You can also report any errors you find in the forum or site here.
Junior Member
User avatar
Posts: 37
Joined: Sat Sep 01, 2007 2:13 pm

Script and Classes forum

Postby Johan » Mon Mar 30, 2009 2:03 pm

I would like to see a forum area that exclusively covers scripting and the use of the classes provide to us in eWall. I am a seasoned programmer and I still struggle to understand and utilize the class objects in eWall. For instance, from the help index;

session.sender; Contains the sender address, available as TEmailItem object.

in order to get the sender domain why do I have to do this:
var frm = new TEmailItem(session.sender); var theDomain = frm.domain;
Why not? var theDomain = session.sender.domain.asText();

Anyway, I forum dedicated to scripting and class objects would be awsome!

Thanks - Johan

Developer
User avatar
Posts: 4431
Joined: Tue Apr 20, 2004 3:43 pm

Postby Alexander Telegin » Mon Mar 30, 2009 3:00 pm

There is a Filters section where users also post the scripting samples. There's not much people using scripting, so I'm not sure if it's a good idea to start new dedicated forum.

in order to get the sender domain why do I have to do this:
var frm = new TEmailItem(session.sender); var theDomain = frm.domain;
Why not? var theDomain = session.sender.domain.asText();


Hm... you don't have to. I'd say more, the code above is incorrect. The eWall help file contains objects reference and examples. I know it's not very descriptive, but feel free to post the questions at Filters forum.

Regarding your code snippet:

session.sender is already an instance of TEmailItem class. So you can use it like this:

var theDomain = session.sender.domain;

Junior Member
User avatar
Posts: 37
Joined: Sat Sep 01, 2007 2:13 pm

Thanks alex...

Postby Johan » Tue Mar 31, 2009 2:35 am

I just assumed the filter forum was just for filters. I will post scripting and class reference questions there. As for the question I had I fairly sure I tried using session.sender.domain and it did not work, however, I will try it agian and make sure it wasn't something I was doing badly...

again, thanks.

Developer
User avatar
Posts: 4431
Joined: Tue Apr 20, 2004 3:43 pm

Postby Alexander Telegin » Tue Mar 31, 2009 4:03 pm

Make sure you put the script in the right event. For example, there's no sense to try get the sender address at OnConnect event, as it's unknown on that stage.

Return to Forum and Site Feedback

Who is online

Users browsing this forum: No registered users and 0 guests