Create TrackStudio issue automatically through email

Discuss problems installing or using TrackStudio.

Create TrackStudio issue automatically through email

Postby fcai » Wed Mar 07, 2012 9:14 pm

Hi,

We are using TS 3.5 and wonder if we can generate ticket in our TS system by customer email.
Sure this email is sent to TS admin email.

Thanks,

fred
fcai
 
Posts: 69
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Re: Create TrackStudio issue automatically through email

Postby Petr » Thu Mar 08, 2012 1:12 pm

Yes It is possible.
http://download.trackstudio.com/doc/en/ ... rames.html
Go to Integrating E-mail Client and TrackStudio->Submit
Стань Java программистом с www.job4j.ru
Petr
 
Posts: 2929
Joined: Wed Aug 12, 2009 4:38 pm

Re: Create TrackStudio issue automatically through email

Postby fcai » Thu Mar 15, 2012 9:56 pm

Petr wrote:Yes It is possible.
http://download.trackstudio.com/doc/en/ ... rames.html
Go to Integrating E-mail Client and TrackStudio->Submit


Thank you very much for this info. I followed the instructions and did everything I could, but it is still not working for me.

1. I am using James as my local mail server(smtp and pop3) and the version is 2.3.2. The SMTP and POP3 works fine to me on my local dell window machine.

2. TrackStudio can send out email from my local SMTP server to any recipient without any problem.

3. But the ticket is not created after I send an email to one designated mailbox "fcai@localhost". I registered user "fcai" in both James mail and Track Studio. The user fcai can create a task on the folder of TrackStudio which I set the email import rule for.

4. My email config in trackstudio.mail.property is like this:
trackstudio.sendMail yes
mail.transport.protocol smtp
mail.smtp.host localhost
mail.smtp.port 25
mail.from Postmaster@localhost
mail.smtp.user Postmaster
mail.smtp.password pass
mail.smtp.timeout 10000
mail.smtp.connectiontimeout 10000
trackstudio.FormMailNotification yes
mail.store.protocol pop3
mail.store.host localhost
mail.store.port 110
mail.store.user Postmaster@localhost
mail.store.forward yes
mail.store.fwdaddress fcai@localhost
mail.debug true

5. Email Import Rule setting
Name Create Task through Email
Keyword (regular expression) BUILD:
In Subject
Order 1
Allowed Domains
Task Properties Parent Task Build Request
Category Build Request
User Import Properties Owner fcai

6. Test code to send the email:
String user = "fcai";
String password = "pass"; // user password

String from = "Postmaster@localhost"; // newlycreateduser@localhost

// Create a mail session
Properties properties = new Properties();
properties.put("mail.smtp.host", "localhost");
properties.put("mail.transport.protocol", "smtp");
properties.put("mail.smtp.port", "25");
properties.put("mail.smtp.username", user);
properties.put("mail.smtp.password", password);

Session session = Session.getDefaultInstance(properties, null);

try
{
InternetAddress[] addrs = new InternetAddress[2];
addrs[0] = new InternetAddress("fcai@localhost");
addrs[1] = new InternetAddress("fcai@foreverliving.com");

Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipients(Message.RecipientType.TO, addrs);
msg.setSubject("BUILD:Test to create a ticket");
msg.setText("I am here");

Transport.send(msg);

System.out.println("Email sent successfully");
}
catch (MessagingException e)
{
e.printStackTrace();
}
fcai
 
Posts: 69
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Re: Create TrackStudio issue automatically through email

Postby fcai » Fri Mar 16, 2012 12:58 am

BTW, Here is the error message I got from TrackStudio log.

process Failed: null
[ 2012-03-15 14:12:51,558 v app.adapter.service.BaseStoreServiceAdapter]
fcai
 
Posts: 69
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Re: Create TrackStudio issue automatically through email

Postby Petr » Mon Mar 19, 2012 2:16 pm

Ok.
Let's do it another way.
Can you test it on our sand box mail server JES?
Then we will know where is problems.
Regard.
Стань Java программистом с www.job4j.ru
Petr
 
Posts: 2929
Joined: Wed Aug 12, 2009 4:38 pm

Re: Create TrackStudio issue automatically through email

Postby fcai » Tue Mar 20, 2012 1:41 am

Petr wrote:Ok.
Let's do it another way.
Can you test it on our sand box mail server JES?
Then we will know where is problems.
Regard.


Thanks,

San box JES works and ticket is created based on email. What is the next?

BTW, I am not quite sure understand what this mean [
[Change the SMTP server host in the e-mail client: host = <JES IP>, port 25. ]


fred
fcai
 
Posts: 69
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Re: Create TrackStudio issue automatically through email

Postby Petr » Tue Mar 20, 2012 9:34 am

Ok. Then you need to confederate it through your mail server like this

# It may be neccessary to configure your SMTP server to deliver all outgoing
# mail through a gateway SMTP server. This may be the case if your ISP blocks outgoing
# SMTP connections. This setting allows you to define a single SMTP server that your server
# will send all remote mail to.
# Optional: add ":PortNumber" after the SMTP server to specify the port number. ex : smtp.myisp.com:25
# More than one server can be defined in a comma seperated list.
#defaultsmtpservers=smtp.myisp.com

this is a file mail.conf.
Стань Java программистом с www.job4j.ru
Petr
 
Posts: 2929
Joined: Wed Aug 12, 2009 4:38 pm

Re: Create TrackStudio issue automatically through email

Postby fcai » Tue Mar 27, 2012 11:38 pm

Petr wrote:Ok. Then you need to confederate it through your mail server like this

# It may be neccessary to configure your SMTP server to deliver all outgoing
# mail through a gateway SMTP server. This may be the case if your ISP blocks outgoing
# SMTP connections. This setting allows you to define a single SMTP server that your server
# will send all remote mail to.
# Optional: add ":PortNumber" after the SMTP server to specify the port number. ex : smtp.myisp.com:25
# More than one server can be defined in a comma seperated list.
#defaultsmtpservers=smtp.myisp.com

this is a file mail.conf.



I forgot to post result here. I had my JES works and now I can create ticket from user's email. What a great tool!
fcai
 
Posts: 69
Joined: Wed Jun 24, 2009 10:57 pm
Location: USA

Re: Create TrackStudio issue automatically through email

Postby admin » Mon Apr 02, 2012 12:19 pm

Thanks!
Maxim Kramarenko (mailto: maximkr@trackstudio.com)
TrackStudio - Hierarchical Bug & Issue Tracking Software
http://www.trackstudio.com
admin
Site Admin
 
Posts: 8148
Joined: Thu Jan 01, 1970 3:00 am
Location: Smolensk, Russia


Return to TrackStudio Support

Who is online

Users browsing this forum: No registered users and 6 guests

cron