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
5
votes
1 answer

How to insert image in Yagmail? (Python)

I have a Yagmail script where I want to send an email formated like so: Hello! Below is a picture. img.png Goodbye! However, my script is just sending the image all the way at the bottom of the email. Here is my code: img = "img.PNG" body = "Hello!…
Bryan Thai
  • 179
  • 1
  • 2
  • 8
3
votes
0 answers

Gmail SMTP Authentication Error when using App password with workspace domain alias

I want to be able to use my Google Workspace email alias when automating email sending using yagmail and gmail's SMTP server. I have set the default "Send Email As" address from the main email (@gmail.com) to the alias email (@domain.com), which is…
brian
  • 31
  • 2
3
votes
1 answer

Sending Email from Outlook365 with Yagmail in Python (Allowing SMTP access)

I can send emails via a Gmail account using the Yagmail module in Python but I am getting a SMTPAuthenticationError when I try to do it with an Outlook email address. Gmail required me to allow "less secure apps" to access my account but I can't…
mjp
  • 1,618
  • 2
  • 22
  • 37
2
votes
2 answers

Python/Yagmail - How to embed local images into e-mail?

I'm currently using the yagmail module to send e-mails with Python, and I'm having difficulty embedding locally stored images into an e-mail. Is this possible? Here's a code example: contents = [""] yag =…
Colin M
  • 35
  • 4
2
votes
0 answers

python yagmail table extra tags in table

I'm using yagmail with python 2.7 to email a table. yag = yagmail.SMTP(config.SENDER_UNAME, config.SENDER_PW) recipient="" subject= "hello" body="hi" html_doc="""
amn41
  • 1,164
  • 1
  • 9
  • 17
2
votes
1 answer

Yagmail converts message body to base 64

I sent an email with the following python code: import yagmail, sha, sys, os os.system('stty -echo') password = raw_input('Gmail password: ') os.system('stty echo') print '' if not sha.sha(password).hexdigest() == 'digest_of_the_password': print…
Will
  • 1,124
  • 12
  • 33
1
vote
1 answer

Error trying to register email credentials with Yagmail and Keyring

I'm using Python3 on a remote machine running Ubuntu 20.10 to send some emails with yagmail. I'm able to send the emails just fine with an application-specific password, as long as the password is spelled out directly in my code. But when I try to…
jbat
  • 33
  • 6
1
vote
0 answers

Skipping login with Yagmail gives YagInvalidEmailAddress

I'm trying to test yagmail on my local SMTP server. However, using yagmail.SMTP with smtp_skip_login flag set to True raises as shown below: import yagmail with yagmail.SMTP(host='localhost', port=1026, smtp_skip_login=True) as server: …
Leonardus Chen
  • 1,103
  • 6
  • 20
1
vote
1 answer

yagmail adding extra line breaks before pandas DataFrame generated html

I'm trying to send a yagmail email containing a pandas DataFrame using the method detailed in this post: Python Email in HTML format mimelib . However, no matter what I try yagmail adds a long string of line breaks prior to the DataFrame being…
CurryPy
  • 43
  • 5
1
vote
1 answer

yagmail installation win32ctypes matching distribution not found error

yagmail was working for me, this is the first time ive tried it since I upgraded to python 3.5, and it doesnt work. I uninstalled yagmail and tried to pip install it again but it showed me this error on no matching distribution found for…
Wboy
  • 2,452
  • 2
  • 24
  • 45
1
vote
1 answer

Python yagmail attachment not working

I'm using yagmail-0.3.78 with Python 3.3 on Windows 8.1. I can get yagmail to send emails from my console but attachments just don't work. yagmail.Connect('myemail@gmail.com','password').send('someguy@gmail.com', 'Test', 'This is a test',…
I_do_python
  • 1,366
  • 4
  • 16
  • 31
0
votes
0 answers

Dockerize a python application for distribution

I created a small python application that automatically sends emails with some customization. I want to distribute it in a way that is fairly easy for end users (i.e., general Windows and macOS users) to download and use. I thought of bundling the…
Louis.vgn
  • 149
  • 1
  • 1
  • 9
0
votes
0 answers

SMTP protocol or YAGMAIL does not allow you to log in two different email account one by one?

I have python code, I can successfully send emails. But at some point, after 76 number of times python script has sent emails, it gives an error. That's why I wanted to rotate email credentials, so I have two email credentials and after it is 50 I…
0
votes
0 answers

Integrate CSS with yagmail python

I am trying to automate a report and send it by mail daily. I would like to have images / graphs embedded in my mail. My program currently generates graphs and saves them on my Destok so I can then join them to my mail with yagmail. I pass a list of…
0
votes
1 answer

difficulty getting oauth 2 token file with yagmail

I am trying to use the python package yagmail to send emails but am having a tough time getting authorization to work. My issue is getting an Oauth 2 token, but there is a disconnect with yagmail, as specified in a github thread. As stated in this…
kramsman
  • 3
  • 3
1
2 3