+def __build_address_headers(options):
+ headers_end = ''
+ if options.to:
+ headers_end += 'To: '
+ for to in options.to:
+ headers_end += '%s,' % to
+ headers_end = headers_end[:-1] + '\n'
+ if options.cc:
+ headers_end += 'Cc: '
+ for cc in options.cc:
+ headers_end += '%s,' % cc
+ headers_end = headers_end[:-1] + '\n'
+ if options.bcc:
+ headers_end += 'Bcc: '
+ for bcc in options.bcc:
+ headers_end += '%s,' % bcc
+ headers_end = headers_end[:-1] + '\n'
+ return headers_end
+