It's all about the answers!

Ask a question

How to get email notification to work?


Jeffrey Liu (111131) | asked Jul 10 '07, 5:47 p.m.
Hi,

I can't get the email notification to work... I modified teamserver.properties with the information of my SMPT server, but for some reason, it doesn't work... Here's what I changed:

com.ibm.team.repository.server.webapp.url = http://localhost:9080/jazz

# Workitem changes can be notified using emails. This property is the global
# switch for enabling/disabling mail notifications.
# Default value: false
workitem.notification.mail.enabled=true

# Mails need an SMTP server to be sent.
# This is a required property.
workitem.notification.mail.smtp.server=<some server>

# A username is needed to authenticate the connection to the SMTP server.
# This is a required property.
workitem.notification.mail.smtp.user=

# A password is needed to authenticate the connection to the SMTP server.
# This is a required property.
workitem.notification.mail.smtp.password=

# Replies to mail notifications will be sent to this address.
# This is a required property.
workitem.notification.mail.reply=<some email>

# Defines the name to use as sender of the notification mails.
# This is a required property.
workitem.notification.mail.from_name=<some name>

# Defines the email address to us as the sender of the notificaiton mails.
# This is a required property.
workitem.notification.mail.from=<some email>

The information above worked when I tried sending an email using Ant's mail task. Notice that my SMPT server does not require a username/password, therefore I left them blank. Am I doing something wrong with my configuration?

4 answers



permanent link
Darin Swanson (3161) | answered Jul 10 '07, 6:53 p.m.
Looking at the com.ibm.team.workitem.service.internal.save.notify.Mailer
code I think you will have problems with empty user and password.

If you look in the error log for your server the Mailer should dump out to
the log what properties are missed or incorrectly set.

HTH
Darins

"jeffliu" <jeffliu@ca.ibm-dot-com.no-spam.invalid> wrote in message
news:f70tgd$kqu$1@localhost.localdomain...
Hi,

I can't get the email notification to work... I modified
teamserver.properties with the information of my SMPT server, but for
some reason, it doesn't work... Here's what I changed:

com.ibm.team.repository.server.webapp.url =
http://localhost:9080/jazz

# Workitem changes can be notified using emails. This property is the
global
# switch for enabling/disabling mail notifications.
# Default value: false
workitem.notification.mail.enabled=true

# Mails need an SMTP server to be sent.
# This is a required property.
workitem.notification.mail.smtp.server=<some server

# A username is needed to authenticate the connection to the SMTP
server.
# This is a required property.
workitem.notification.mail.smtp.user=

# A password is needed to authenticate the connection to the SMTP
server.
# This is a required property.
workitem.notification.mail.smtp.password=

# Replies to mail notifications will be sent to this address.
# This is a required property.
workitem.notification.mail.reply=<some email

# Defines the name to use as sender of the notification mails.
# This is a required property.
workitem.notification.mail.from_name=<some name

# Defines the email address to us as the sender of the notificaiton
mails.
# This is a required property.
workitem.notification.mail.from=<some email

The information above worked when I tried sending an email using Ant's
mail task. Notice that my SMPT server does not require a
username/password, therefore I left them blank. Am I doing something
wrong with my configuration?

permanent link
Shawn Lauzon (38174) | answered Aug 22 '07, 12:38 p.m.
Not sure if this was resolved, but I also used a blank user & password as below, and it worked for me on M2.

permanent link
Shawn Lauzon (38174) | answered Aug 23 '07, 1:10 p.m.
UPDATE: I was incorrect in my previous note. Sending out a team invitation worked fine, but generic notifications do not work. I currently get a NPE:

00000029 SystemOut O 12:05:06,071 ERROR com.ibm.team.workitem - Following required properties are undefined or empty:
- workitem.notification.mail.smtp.user
- workitem.notification.mail.smtp.password
0000002a SystemOut O 12:05:06,096 ERROR com.ibm.team.workitem - Error while sending mail notifications
java.lang.NullPointerException
at com.ibm.team.workitem.service.internal.save.notify.StateChangePresentation.getValue(StateChangePresentation.java:40)
at com.ibm.team.workitem.service.internal.save.notify.DefaultChangePresentation.getChangeText(DefaultChangePresentation.java:35)
at com.ibm.team.workitem.service.internal.save.notify.ChangePresentation.getChangeText(ChangePresentation.java:210)
at com.ibm.team.workitem.service.internal.save.notify.ChangePresentation.getChangeText(ChangePresentation.java:167)
at com.ibm.team.workitem.service.internal.save.notify.ChangeEventMailNotifier.createMail(ChangeEventMailNotifier.java:254)
at com.ibm.team.workitem.service.internal.save.notify.ChangeEventMailNotifier.sendChanges(ChangeEventMailNotifier.java:150)
at com.ibm.team.workitem.service.internal.save.notify.ChangeEventMailNotifier.run(ChangeEventMailNotifier.java:101)
at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.sendMailNotifications(WorkItemRepositoryService.java:617)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.ibm.team.repository.service.internal.scheduler.SchedulerManagerService$ServiceTaskAsyncTask.runTask(SchedulerManagerService.java:282)
at com.ibm.team.repository.service.async.internal.InstrumentedAsyncTask.runTask(InstrumentedAsyncTask.java:66)
at com.ibm.team.repository.service.async.internal.AsyncTaskRunner.run(AsyncTaskRunner.java:153)
at java.lang.Thread.run(Thread.java:803)

permanent link
Frank Lyner (91) | answered Aug 31 '07, 6:56 a.m.
The code in the StateChangePresentation has changed and the NPE can't
happen anymore. You filed defect 29669 regarding the empty user/password
properties which I will fix for M3.

Regards,
Frank

shawnlauzon schrieb:
UPDATE: I was incorrect in my previous note. Sending out a team
invitation worked fine, but generic notifications do not work. I
currently get a NPE:

00000029 SystemOut O 12:05:06,071
ERROR com.ibm.team.workitem
- Following required properties are undefined or empty:
- workitem.notification.mail.smtp.user
- workitem.notification.mail.smtp.password
0000002a SystemOut O 12:05:06,096
ERROR com.ibm.team.workitem
- Error while sending mail notifications
java.lang.NullPointerException
at
com.ibm.team.workitem.service.internal.save.notify.StateChangePresentation.getValue(StateChangePresentation.java:40)
at
com.ibm.team.workitem.service.internal.save.notify.DefaultChangePresentation.getChangeText(DefaultChangePresentation.java:35)
at
com.ibm.team.workitem.service.internal.save.notify.ChangePresentation.getChangeText(ChangePresentation.java:210)
at
com.ibm.team.workitem.service.internal.save.notify.ChangePresentation.getChangeText(ChangePresentation.java:167)
at
com.ibm.team.workitem.service.internal.save.notify.ChangeEventMailNotifier.createMail(ChangeEventMailNotifier.java:254)
at
com.ibm.team.workitem.service.internal.save.notify.ChangeEventMailNotifier.sendChanges(ChangeEventMailNotifier.java:150)
at
com.ibm.team.workitem.service.internal.save.notify.ChangeEventMailNotifier.run(ChangeEventMailNotifier.java:101)
at
com.ibm.team.workitem.service.internal.WorkItemRepositoryService.sendMailNotifications(WorkItemRepositoryService.java:617)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at
com.ibm.team.repository.service.internal.scheduler.SchedulerManagerService$ServiceTaskAsyncTask.runTask(SchedulerManagerService.java:282)
at
com.ibm.team.repository.service.async.internal.InstrumentedAsyncTask.runTask(InstrumentedAsyncTask.java:66)
at
com.ibm.team.repository.service.async.internal.AsyncTaskRunner.run(AsyncTaskRunner.java:153)
at java.lang.Thread.run(Thread.java:803)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.