简体   繁体   English

无法使用 python 脚本从 Jenkins 发送 email

[英]Cannot able to send email from Jenkins using python script

I am having the script to send outlook email through python libaray win32/Automagica.我有通过 python libaray win32/Automagica 发送 outlook email 的脚本。 The email have successfully send if i run the script in normal way(using IDE) when i try to run the same script from jenkins,it throws "Exception: Could not launch Outlook, do you have Microsoft Office installed on Windows?" The email have successfully send if i run the script in normal way(using IDE) when i try to run the same script from jenkins,it throws "Exception: Could not launch Outlook, do you have Microsoft Office installed on Windows?"

outlook = Outlook(account_name=accountName) File "C:\Python39\lib\site-packages\automagica\utilities.py", line 41, in wrapper return func(*args, **kwargs) File "C:\Python39\lib\site-packages\automagica\activities.py", line 4186, in init self.app = self._launch() File "C:\Python39\lib\site-packages\automagica\activities.py", line 4202, in _launch raise Exception( Exception: Could not launch Outlook, do you have Microsoft Office installed on Windows? outlook = Outlook(account_name=accountName) 文件“C:\Python39\lib\site-packages\automagica\utilities.py”,第 41 行,在包装器中返回 func(*args, **kwargs) 文件“C:\Python39\ lib\site-packages\automagica\activities.py”,第 4186 行,在init self.app = self._launch() 文件中“C:\Python39\lib\site-packages\automagica\activities.py”,第 4202 行,在_launch引发异常(异常:无法启动Outlook,您是否在Windows上安装了Microsoft Office?

Yeah..Now it is working..it is because of Jenkins running under Admin rights and Outlook is in User Rights...after i start to run Jenkins on User rights(not Admin)it is able to send email through Outlook Yeah..Now it is working..it is because of Jenkins running under Admin rights and Outlook is in User Rights...after i start to run Jenkins on User rights(not Admin)it is able to send email through Outlook

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM