Skip to main content

Make Send Mail Easy In Python 3

Project description

EasyMail Class

Make Send Mail Easy In Python 3

try:
    #Import EasyMail
    import easyemail
except(ModuleNotFoundError,ImportError):
    #Use Folder Version
    from . import easymail

1銆丼end An Plain Email

def sendPlain(client,
              receivers,
              text="",
              subject="",
              sender_name=None,
              receivers_name=None,
              encoding="utf-8"
              ):
    '''
    Send Plain Email
    :param client:EMAIL CLIENT(SMTPClient)
    :param receivers:the Receivers(str or list or tuple or frozenset)
    :param text:Email HTML Body
    :param subject:Email Subject
    :param sender_name:Email Sender's Name(From,Default value is sender Email Address)
    :param receivers_name:Email Receivers' Name(To,Default value is 1st Receivers)
    :param encoding:Text,Subject,sender_name,receivers_name 's encoding,default is 'utf-8'
    :return:Hasn't return
    '''
    pass

You can use this futc. to send an email,like this

from easymail import *
client=SMTPClient("smtp.abc.com")#Your Email Server
client.login("def@abc.com","123456")#Your Email And Your Password
sendPlain(client,["ghi@abc.com"],"The Subject","HelloWorld","ghi","def","utf-8")

The HTML Futc.:

def sendHTML(client:SMTPClient,
              receivers,
              text="",
              subject="",
              sender_name=None,
              receivers_name=None,
              encoding="utf-8"
              ):
    '''
    Send Plain Email
    :param client:EMAIL CLIENT(SMTPClient)
    :param receivers:the Receivers(str or list or tuple or frozenset)
    :param text:Email Body
    :param subject:Email Subject
    :param sender_name:Email Sender's Name(From,Default value is sender Email Address)
    :param receivers_name:Email Receivers' Name(To,Default value is 1st Receivers)
    :param encoding:Text,Subject,sender_name,receivers_name 's encoding,default is 'utf-8'
    :return:Hasn't return
    
    '''
    pass

Html is similar to the function of sending plain text, so I won't repeat it here.

send Any Text:

def sendAnyText(client:SMTPClient,
              receivers,
                typeof="plain",
              text="",
              subject="",
              sender_name=None,
              receivers_name=None,
              encoding="utf-8"
              ):
    '''
    Send Plain Email
    :param client:EMAIL CLIENT(SMTPClient)
    :param receivers:the Receivers(str or list or tuple or frozenset)
    :param typeof:Mail Body Type(default:plain)
    :param text:Email Body
    :param subject:Email Subject
    :param sender_name:Email Sender's Name(From,Default value is sender Email Address)
    :param receivers_name:Email Receivers' Name(To,Default value is 1st Receivers)
    :param encoding:Text,Subject,sender_name,receivers_name 's encoding,default is 'utf-8'
    :return:Hasn't return
    '''
    pass

It's similar too!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easymailsender-1.2.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file easymailsender-1.2.tar.gz.

File metadata

  • Download URL: easymailsender-1.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.4

File hashes

Hashes for easymailsender-1.2.tar.gz
Algorithm Hash digest
SHA256 6a3437c7fc0dad69f1dee38ba8a26ab60f49fe1ea30fad30d7fcbc78657622a7
MD5 3939b35c51c8ca16964aa8960d16e3d2
BLAKE2b-256 bf593944e4df028ca99cd37c30576935c77171e3d61d3bea3a58724e877065f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page