이 모듈을 사용하려면 curl_cffi
패키지와 함께 컴퓨터에 파이썬이 설치되어 있는지 확인하십시오. PIP를 사용하여 필요한 패키지를 설치할 수 있습니다.
pip install curl-cffi temp-gmail
다음은 모듈에서 Gmail 클래스를 사용하는 방법의 기본 예입니다.
from temp_gmail import GMail
# Creating an instance of the GMail class
gmail_instance = GMail ()
# Creating a temporary email
email_address = gmail_instance . create_email ()
print ( "Generated Email:" , email_address )
# Loading the email list for the new email
emails = gmail_instance . load_list ()
print ( "Emails:" , emails )
# Example: Check for new items with a specific keyword
message_info = gmail_instance . check_new_item ( "welcome" )
print ( "Message Details:" , message_info )
다음은 Gmail 클래스에 포함 된 일부 방법에 대한 간단한 개요입니다.
- create_email()
> No parameters required.
> Returns the generated email address.
- load_list()
> No parameters required.
> Fetches all messages for the current email account.
- load_item(message_id)
> message_id: ID of the message to retrieve.
> Returns the contents of the specified message.
- check_new_item(keyword)
> keyword: The keyword to search for in messages.
> Searches all messages for the keyword and returns the first message ID with a match.
CURL_CFFI : CFFI를 통해 CURL과 상호 작용하는 방법을 제공하는 파이썬 패키지.