Trac API 不会发送电子邮件
Trac API won't send email
Trac 网络应用程序可以完美地发送电子邮件。我什至配置了 Trac Html 通知插件,它也能正常工作。
我想使用 API 更新工单并让他们也发送通知,但它不起作用。
我正在做这样的事情
from trac.core import *
from trac.env import Environment
from trac.ticket.model import Ticket
env = Environment('E:\Trac/project')
tkt = Ticket(env, 383)
tkt['status'] = 'assigned'
tkt.save_changes()
或
from trac.core import *
from trac.env import Environment
from trac.ticket.model import Ticket
env = Environment('E:\Trac/project')
summary = "Test New Ticket"
description = 'Testing new ticket'
tkt = Ticket(env)
tkt['reporter'] = 'jorozco'
tkt['owner'] = 'jorozco'
tkt['summary'] = summary
tkt['description'] = description
tkt['priority'] = 'Top'
tkt['task'] = '33'
tkt['status'] = 'new'
tkt.insert()
我在 Windows 上使用 Trac 1.5.1 版。
谢谢,
乔
Trac 网络应用程序可以完美地发送电子邮件。我什至配置了 Trac Html 通知插件,它也能正常工作。
我想使用 API 更新工单并让他们也发送通知,但它不起作用。 我正在做这样的事情
from trac.core import *
from trac.env import Environment
from trac.ticket.model import Ticket
env = Environment('E:\Trac/project')
tkt = Ticket(env, 383)
tkt['status'] = 'assigned'
tkt.save_changes()
或
from trac.core import *
from trac.env import Environment
from trac.ticket.model import Ticket
env = Environment('E:\Trac/project')
summary = "Test New Ticket"
description = 'Testing new ticket'
tkt = Ticket(env)
tkt['reporter'] = 'jorozco'
tkt['owner'] = 'jorozco'
tkt['summary'] = summary
tkt['description'] = description
tkt['priority'] = 'Top'
tkt['task'] = '33'
tkt['status'] = 'new'
tkt.insert()
我在 Windows 上使用 Trac 1.5.1 版。
谢谢,
乔