Hi, i am Julia, a beginner python developer.
So, i was trying to add an action to a button on my starting card, this button should open an outlook window with an edited email. The code that should open an outlook window is working with no problems. But, when i add this code to a function or a class in my code with the button of Webex bot card i have multiples errors, with classes and functions, and the most of the times, the bot run, open the outlook window and just stop, or continue to running but if you press the button nothing happens.
This is my last code :
import logging
import win32com.client as win32
from webex_bot.models.command import Command
log = logging.getLogger(__name__)
class TesteEmail(Command):
def __init__(self
super().__init__(
command_keyword="email",
help_message="Envie seu chamado para a T.I!",
card=None,
)
class Chamado(Command):
def __int__(self, recipient, subject, text, outlook):
super().__init__(
help_message="Envie seu chamado para a T.I!",
)
outlook = win32.Dispatch('Outlook.application')
self = outlook.CreateItem(0)
self.To = "person1@gmail.com"
self.Subject = "Auto test mail"
self.HtmlBody = """
#html code here
"""
self.Display(False)
I will be so glad if someone could help me to make it work, and just open the outlook window when the user press the button. Thank you !