Python win32com Outlook HTMLbody formatting directory incorrectly -


i trying send hyperlink shared directory using win32com in body text of outlook email. not sure happening path when program ran making directory appear below.

import win32com.client win32 outlook = win32.dispatch('outlook.application') mail = outlook.createitem(0) mail.to = 'email addresses' mail.subject = 'subject' mail.htmlbody = ("hello -<br><br>"          "please find following files in shared drive:<br>"          "<a href='\\servername1\apps\folder'>"          "\\servername1\apps\folder</a><br><br>"          "the file names are:<br>"          "filenames") mail.send 

the file path appearing in email as: \servername1pps\folder

guy @ work able answer question.

import win32com.client win32 outlook = win32.dispatch('outlook.application') mail = outlook.createitem(0) mail.to = 'email addresses' mail.subject = 'subject' mail.htmlbody = (r"""hello -<br><br>      please find following files in shared drive:<br>      <a href='\\servername1\apps\folder'>      \\servername1\apps\folder</a><br><br>      file names are:<br>      filenames""") mail.send 

we added "r" followed triple quote , worked.

not sure r means, worked. maybe can explain r me. dumb question, don't know.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -