0

I am having the script to send outlook email through python libaray win32/Automagica . 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?

  • does you Jenkins run on your windows machine or a server? Is Outlook installed on that server? – smelm Dec 04 '20 at 11:38
  • I am running Jenkins in a windows machine and outlook also installed – Saravanan S Dec 04 '20 at 11:40
  • okay, so maybe you need to add it to the PATH. Have a look here https://stackoverflow.com/questions/36473479/how-to-set-the-path-environment-variable-in-jenkins-configuration-on-windows for more information. – smelm Dec 05 '20 at 13:18

1 Answers1

0

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