smail icon indicating copy to clipboard operation
smail copied to clipboard

[bug] not able to receive mail

Open firefoxOnFire opened this issue 10 months ago • 11 comments

Hello again @tinsfox,

After deployment, I am not able to receive the mail. And I guess it is due to this as there is no process in workers. Thanks.

firefoxOnFire avatar Apr 10 '24 11:04 firefoxOnFire

Check to see if there is any data in your https://turso.tech/ database. The two lines here are for the front end to read the contents of the database and display the data

The process is...

  1. The email is sent to the cf worker and stored in the database in woker
  2. The front-end code reads the mail display data in the database

TinsFox avatar Apr 10 '24 12:04 TinsFox

Check to see if there is any data in your https://turso.tech/ database. The two lines here are for the front end to read the contents of the database and display the data

The process is...

  1. The email is sent to the cf worker and stored in the database in woker
  2. The front-end code reads the mail display data in the database

TinsFox avatar Apr 10 '24 12:04 TinsFox

The two lines here are for the front end to read the contents of the database and display the data

but index.ts is also importing that function from that file. Can you recheck?

firefoxOnFire avatar Apr 10 '24 13:04 firefoxOnFire

@firefoxOnFire I'm so sorry, you're right! Because the worker code I used for testing was deployed a long time ago and has not been redeployed since, my mail storage is still normal.

fix it by https://github.com/akazwz/smail/pull/8

TinsFox avatar Apr 10 '24 14:04 TinsFox

@firefoxOnFire I'm so sorry, you're right! Because the worker code I used for testing was deployed a long time ago and has not been redeployed since, my mail storage is still normal.

fix it by #8

Thanks for the quick fix. I am encountering this error "LibsqlError: SQLITE_UNKNOWN: SQLite error: no such table: emails", I know this is because I have to create table, but I am not finding a way to do so in windows.

Why can't we create table in the worker itself?

firefoxOnFire avatar Apr 10 '24 14:04 firefoxOnFire

@firefoxOnFire I'm so sorry, you're right! Because the worker code I used for testing was deployed a long time ago and has not been redeployed since, my mail storage is still normal. fix it by #8

Thanks for the quick fix. I am encountering this error "LibsqlError: SQLITE_UNKNOWN: SQLite error: no such table: emails", I know this is because I have to create table, but I am not finding a way to do so in windows.

Why can't we create table in the worker itself?

You need to refer to the documentation of the database https://docs.turso.tech/cli/introduction to create it with the command using the CLI tool

Because workers are not suitable for database creation and migration files

By the way, we will change the database used and the tools to connect to the database later, so this step will be even easier!

But now limited by the database turso, there is no way to accomplish this well (Maybe I can come up with a temporary solution to solve this problem, which only requires executing a command. But I wonder if there is a demand?)

TinsFox avatar Apr 10 '24 16:04 TinsFox

I wonder if there is a demand?

Got it working thanks. It was from, to and references which was causing problem. Now I have successfully created the table.

firefoxOnFire avatar Apr 10 '24 17:04 firefoxOnFire

"LibsqlError: SQLITE_UNKNOWN: SQLite error: table emails has no column named domain" Now I am gettin this error. domain and attachments are missing from the query. Can you provide me updated query? Thanks.

firefoxOnFire avatar Apr 10 '24 17:04 firefoxOnFire

Now, I have received the mail in the web. But html is not getting rendered.

I guess I am reporting too much bugs, I should wait for the code to be matured and stable. I am really sorry. Thanks.

firefoxOnFire avatar Apr 10 '24 17:04 firefoxOnFire

@firefoxOnFire I'm very sorry to bring you a bad experience, maybe I need to test all the processes again

TinsFox avatar Apr 11 '24 07:04 TinsFox

No problem sir. I can understand, this is not an easy thing to maintain. I am waiting for your stable release, so i can test further. Thanks.

firefoxOnFire avatar Apr 11 '24 08:04 firefoxOnFire