o
    /h                  
   @   sN   d dl mZ d dlZzd dlZW n eeefy   Y nw dd Zdd ZdS )    )SMTPNc                 C   s   t d| | dS )zV Use this to add a new gmail account to your OS' keyring so it can be used in yagmail yagmailN)keyringset_password)usernamepassword r   D/var/www/html/myenv/lib/python3.10/site-packages/yagmail/__main__.pyregister
   s   r
   c                  C   s   ddl } | jdd}|jddddd	 |jd
dddd	 |jddddd	 |jddddd	 |jdddd |jdddd | }t|j|j}|j|j|j	|j
|jd dS )zB This is the function that is run from commandline with `yagmail` r   NzSend a (g)mail with yagmail.)descriptionz-toz-tzSend an email to address "TO"+)helpnargsz-subjectz-szSubject of emailz	-contentsz-czContents to sendz-attachmentsz-azAttachments to attachz-userz-uUsername)r   z	-passwordz-pz3Preferable to use keyring rather than password here)tosubjectcontentsattachments)argparseArgumentParseradd_argument
parse_argsr   userr   sendr   r   r   r   )r   parserargsyagr   r   r	   main   s   r   )	yagmail.senderr   sysr   ImportError	NameErrorRuntimeErrorr
   r   r   r   r   r	   <module>   s    