Closed raiavincent closed 3 years ago
Did you try to provide cc=list_of_emails?
On Tue, 21 Jul 2020, 17:48 Vincent Raia, notifications@github.com wrote:
Hello,
Currently using EZGmail for a project I am working on, where I am sending an email to a list of emails found on an exterior list.
I have tried to move this process over to yagmail but have not had much luck.
Is there something I am missing or is this an upcoming feature?
The project code can be found here if more background is needed.
https://github.com/raiavincent/Daily-Meditations-Passage
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kootenpv/yagmail/issues/171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAU6O4542NNWD53C7RBHL2DR4W2GRANCNFSM4PDXR3IA .
Oh, so instead of to=list_of_emails , I should make it CC or BCC? That makes a lot more sense. I am guessing the 'to' field only accepts 1 email?
@raiavincent were you able to figure out how to send to a list of emails?
I've tried things like
yagmail.register('blah@gmail.com','blah')
yag = yagmail.SMTP('blah@gmail.com')
ccz = 'blah2@gmail.com blah3@gmail.com'
subject = 'This is obviously the subject'
body = 'This is obviously the body'
yag.send(cc = ccz, subject = subject, contents = body)
But I get the YagInvalidEmailAddress: Emailaddress
error (I suppose as expected)
@raiavincent were you able to figure out how to send to a list of emails?
I've tried things like
yagmail.register('blah@gmail.com','blah') yag = yagmail.SMTP('blah@gmail.com') ccz = 'blah2@gmail.com blah3@gmail.com' subject = 'This is obviously the subject' body = 'This is obviously the body' yag.send(cc = ccz, subject = subject, contents = body)
But I get the
YagInvalidEmailAddress: Emailaddress
error (I suppose as expected)
You should use a list:
ccz = ['blah2@gmail.com', 'blah3@gmail.com']
You should use a list:
ccz = ['blah2@gmail.com', 'blah3@gmail.com']
Well then, after reading the question again I suppose this should have been obvious / implied. Thanks!
You should use a list:
ccz = ['blah2@gmail.com', 'blah3@gmail.com']
Well then, after reading the question again I suppose this should have been obvious / implied. Thanks!
Hahaha yeah nice one xD
Hello,
Currently using EZGmail for a project I am working on, where I am sending an email to a list of emails found on an exterior list.
I have tried to move this process over to yagmail but have not had much luck.
Is there something I am missing or is this an upcoming feature?
The project code can be found here if more background is needed.
https://github.com/raiavincent/Daily-Meditations-Passage