cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Email notification doesn't work

seanccc
17-Peridot

Email notification doesn't work

Hi experts,

 

I have email extension installed. I create a thing "MyMailServer2" based on it and it works if test it with script. 

However, it doesn't work when I create a entity Notification "EmailNotify" and set  "MyMailServer2" as the handler.  I have no clue about it , could you help ?  

 

===================Updated on Feb 9==============

I didn't figure out the problem above , then I tried to turn to script to send email. So I need to get the recipients defined in the Notification.  I can get the notification content "testNotify" by running the service "GetNotificationContents",  While executing the service "GetUserRecipientsOfEvent" , it tells me no notification conent found(see the Capture5.PNG) .  Any idea about it ? 

 

The Thingworx I installed from : twxFoundationH2Trial-8.3.2-windows-installer.zip

Version of email extension: 3.6.0

 

Regards,

Sean

Thank you 

 

11 REPLIES 11
PaiChung
22-Sapphire I
(To:seanccc)

Are there any errors in the Application Log when the even fires the notification?

seanccc
17-Peridot
(To:PaiChung)

No, I checked it but didn't find any error/warning log about it . 

PaiChung
22-Sapphire I
(To:seanccc)

Since you don't see any error messages, I would put some logger statements in the code, to verify that it is trying to send the email.

 

seanccc
17-Peridot
(To:PaiChung)

Actually I tried to send email via script firstly and it works, but I don't want to hard code the recipients in script.  so I tried two options: 1. Notification entity and 2. find recipients in the script.  But  the problems are : 

 

  • 1. I want to send via Notification so that I don't have to hard code the recipients in the script , however it doesn't work. and I think I have no place to put the logger statement if use Notification , right ? 

 

  • 2. To avoid the hard code recipients in the script, I tried to get the recipients specified in Notification,  but executing the service GetUserRecipientsOfEvent return nothing. 

Regards,

Sean

 

PaiChung
22-Sapphire I
(To:seanccc)

You are using Navigate or the Manufacturing starter apps?

seanccc
17-Peridot
(To:PaiChung)

No, I'm using thingworx composer only

PaiChung
22-Sapphire I
(To:seanccc)

Ok so you should be able to add logger statements in your code to troubleshoot your issue.

slangley
23-Emerald II
(To:PaiChung)

Hi @seanccc.

 

If you have found a solution to your problem, please post it here and mark it as the Accepted Solution for the benefit of others with the same issue.

 

Regards.

 

--Sharon

seanccc
17-Peridot
(To:slangley)

Hi Sharon,

sorry, but I haven't found appropriate solution for it. 

 

Regards,

Sean 

 

PaiChung
22-Sapphire I
(To:seanccc)

Were you able to get some more insight as to where the issue is by using the logger statements? What parts of the logic are properly executing and what values is it using etc?

abarki
15-Moonstone
(To:seanccc)

Hi @seanccc,

 

If you still observe the issue, kindly provide @PaiChung with answer to his questions.

 

Thank you,

abarki

Announcements


Top Tags