from django.core.mail import EmailMessage
from emaillist.models import EmailExclusion

def send_mail(subject, body, from_email, recipient_list, fail_silently=False):
    to = [addr for addr in recipient_list if not EmailExclusion.excluded(addr)]

    for addr in to:

        #For now use default email body with an unsubscribe link
        html_content = '%s <br><a href="http://rcos.rpi.edu/email/remove/%s"> Unsubscribe From RCOS Emails</a>' % (body, addr)

        msg = EmailMessage(subject, html_content, from_email, [addr])
        msg.content_subtype = "html"  # Main content is now text/html
        msg.send(fail_silently = fail_silently)

@@ -78,16 +78,61 @@
 xclusion
+%0Afrom django.core.urlresolvers import reverse
 %0A%0Adef se
@@ -285,16 +285,97 @@
 addr)%5D%0A%0A
+    #Doing a separate email for each person so we can allow unsubscription links%0A
     for 
@@ -496,41 +496,8 @@
 ef=%22
-http://rcos.rpi.edu/email/remove/
 %25s%22%3E
@@ -539,16 +539,64 @@
 %25 (body,
+ reverse('emaillist.views.remove', args=%5Baddr%5D),
  addr)%0A%0A

Update format to produce a valid link