We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 12c72bb commit d78be6aCopy full SHA for d78be6a
1 file changed
sendgrid/message.py
@@ -1,4 +1,4 @@
1
-import io
+import import sys
2
import sys
3
import json
4
try:
@@ -62,6 +62,12 @@ def add_to(self, to):
62
self.parse_and_add(to)
63
elif sys.version_info < (3, 0) and isinstance(to, unicode):
64
self.parse_and_add(to.encode('utf-8'))
65
+ elif type(to) is tuple:
66
+ if len(to) == 1:
67
+ self.add_to(to[0])
68
+ elif len(to) == 2:
69
70
+ self.add_to_name(to[1])
71
elif hasattr(to, '__iter__'):
72
for email in to:
73
self.add_to(email)
0 commit comments