Questions tagged [yagmail]

yagmail - Yet Another GMAIL client for Python

The goal of yagmail is to make it as simple and painless as possible to send emails using Python.

39 questions
0
votes
0 answers

Yagmail script not sending multiple attachments

I have a script that sends files to a bunch of different vendors. So the contents part changes every iteration. It works perfectly sending one attachment, but when I add another path in either the contents section ( and I have also tried) the…
rmcknst2
  • 195
  • 1
  • 2
  • 11
0
votes
3 answers

Is there a way to throw an exception if a file is not found in python?

I am making a program so that emails can easily be sent to a list of people with a unique file going to each recipient. This program reads in a list in the form of a .csv file with the last name, first name, email address, and respective attachment…
Alex
  • 27
  • 7
0
votes
1 answer

Add custom text message after break line

The below code snippet sends email with status. If I want to add another line break with text as Sent from Scheduler. What could be the possible way ? def send_email(status,message): date = str(datetime.now().date())[-5:].replace('-', '/') …
user852986
  • 15
  • 4
0
votes
1 answer

yagmail how to hidden recipients

I'm trying to develop a mass email script by yagmail. My script works properly but what I want is to showing only the receiving recipient's Email in the 'To' field and not all others. E.g. If I send Emails to example1@email.com and…
Andrea Angeli
  • 131
  • 1
  • 16
0
votes
1 answer

Python yagmail authentication configuration

I'm trying to setup yagmail with an external .yagmail file with credentials but when I run the code it returns YagInvalidEmailAddress: Emailaddress "yagmail.register('my.username@gmail.com', 'my.password')" is not valid according to RFC 2822…
Andrea Angeli
  • 131
  • 1
  • 16
0
votes
2 answers

Add Date to the subject

def send_email(status,message): yag.send(to=TO_EMAIL,subject="Test Subject: {}".format(status),contents=message) logging.info("Mail Sent!") How do I add the current date DDMM format just before the subject line like: 0308 Test Subject ?…
user852986
  • 15
  • 4
-1
votes
1 answer

voice to email not sending the password

python voice to email not working. Everything works just fine. It records and gives me my message output, but it doesn't send the password. import speech_recognition as sr import yagmail recognizer=sr.Recognizer() with sr.Microphone() as source: …
-1
votes
1 answer

Script fail in cron but works in command line "keyring error"

Hello I have created a python script and wanted to execute it daily with crontab. I want to execute it on an "Ubuntu server" (basically an old latop that use ubuntu desktop 20.04.2.0 but I always keep him close and log into it with ssh mainly) In…
Hectobros
  • 1
  • 1
-2
votes
1 answer

how to implement the format for row count

I have a dataframe which has a list of names and email add, for example: using yagmail i want to send a text to the email add in DataFrame. Desired output should be like this mark-> sending email 1/3 jess-> sending email 2/3 riza -> sending email…
Sin Clair
  • 31
  • 6
1 2
3