tempmail-python icon indicating copy to clipboard operation
tempmail-python copied to clipboard

Getting issue while fetching mail id

Open nitinkumar30 opened this issue 1 year ago • 2 comments

image

Getting error while splitting mail ID from gmail.

username, domain = address.split('@')
    ^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)

Kindly check this. Getting subject and body of mail but just username or mail id from where mail is coming is not getting.

nitinkumar30 avatar May 25 '24 09:05 nitinkumar30

image Getting error while splitting mail ID from gmail.
username, domain = address.split('@')
    ^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)

Kindly check this. Getting subject and body of mail but just username or mail id from where mail is coming is not getting.

This code is wrong. It checks body of mail as address, but it should include mail id. Check this code in providers.py file

image

This is the output I'm getting while printing the address.

image

nitinkumar30 avatar May 25 '24 12:05 nitinkumar30

Hi, seems like you're using the library incorrectly.

In this line:

email = EMail(msg.body)

You are trying to pass msg.body to EMail, but EMail only accepts address ([email protected])

cubicbyte avatar May 25 '24 14:05 cubicbyte