Send PDF File through Email using pdf-mail module
Last Updated :
16 Jul, 2020
pdf_mail module is that library of Python which helps you to send pdf documents through your Gmail account.
Installing Library
This module does not come built-in with Python. You need to install it externally. To install this module type the below command in the terminal.
pip install pdf-mail
Function of pdf_mail
This module only comes with a single functionality of sending mail from one account to another. The function used to do the same is –
- email_send():: It will send the pdf document from your Gmail account to another Gmail account .
Note :
Below is the implementation.
from pdf_mail import sendpdf
sender_email_address = input ()
receiver_email_address = input ()
sendere_email_password = input ()
subject_of_email = input ()
body_of_email = input ()
filename = input ()
location_of_file = input ()
k = sendpdf(sender_email_address,
receiver_email_address,
sender_email_password,
subject_of_email,
body_of_email,
filename,
location_of_file)
k.email_send()
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...