title: Ignoring variable in Python multiline string
body: <p>I'm forwarding an HTML e-mail using a Python script, which is in a multi line string. It needs to read 4 externally given variables (which work). But there's a mail:to link which uses %20 and %40. I'm using %s to refer to the other objects. When I try to execute the script, it gives the following error:</p>
  
  <blockquote>
    <p>TypeError: %o format: a number is required, not str</p>
  </blockquote>
  
  <p>Which I understand, as it expects the %20 and %40 to be a reference to a variable too. I really want to include the mail:to link, but I can't seem to make Python ignore the values. </p>
  
  <pre><code>#!/usr/bin/env python
  
  list1=[0,1,2,3,4];
  
  import mimetypes, os, smtplib, sys, 
  from email import encoders
  from email.mime.audio import MIMEAudio
  from email.mime.base import MIMEBase
  from email.mime.image import MIMEImage
  from email.mime.multipart import MIMEMultipart
  from email.mime.text import MIMEText
  from email.utils import formatdate
  from email.utils import make_msgid
  
  
  me = "xx@yy.nl"
  you = "yy@xx.nl"
  DESTINATION=sys.argv[1]
  SUBJECT=sys.argv[2]
  MESSAGE=sys.argv[3]
  PASS='password'
  SRVSMTP='mysmtpserv:587'
  msg = MIMEMultipart('alternative')
  msg['Subject'] = SUBJECT
  msg['From'] = me
  msg['To'] = you
  msg['Date'] = formatdate()
  msg['Message-ID'] = make_msgid()
  
  sys.argv[3].split(";")
  hostnam, trgname, trgstat, trgseve = sys.argv[3].split(";")
  print sys.argv[3].split(";")
  
  text = """ plaintext email here
  """
  html = """
  &lt;html&gt;
  &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p style="margin-left: 80px;"&gt;&lt;strong&gt;Trigger:&lt;/strong&gt; %s trgname &lt;br /&gt;
  &lt;strong&gt;Status&lt;/strong&gt;: %s  trgstat &lt;br /&gt;
  &lt;strong&gt;Severity:&lt;/strong&gt; %s  trgseve &lt;/p&gt;
  
  &lt;p style="margin-left: 40px;"&gt;&lt;a href="mailto:xx%40yy.nl?bcc=yy%40xx.com&amp;amp;body=insert%20text%2C%0A%0Ahere%20for%20the%20emailA%5BFirmname%5D%0A%5B%28Address%29%20Adressline2%5D"&gt;Click here&lt;/a&gt; &amp;nbsp;&lt;strong&gt; %s hostnam.&lt;/strong&gt;&lt;br /&gt;
  &amp;nbsp;&lt;/p&gt;
  &lt;a href="mailto:xxxyyy@yxy.com?subject=Unsubscribe%20me"&gt;Click here to unsubscribe&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
  &amp;nbsp;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  """ % ('hostnam', 'trgname', 'trgstat', 'trgseve', 'hostnam')
  
  part1 = MIMEText(text, 'plain')
  part2 = MIMEText(html, 'html')
  msg.attach(part1)
  msg.attach(part2)
  smtpserver = smtplib.SMTP(SRVSMTP)
  smtpserver.ehlo()
  smtpserver.starttls()
  smtpserver.ehlo()
  smtpserver.login(me, PASS)
  smtpserver.sendmail(me, you, msg.as_string())
  smtpserver.quit()
  </code></pre>