Coder Social home page Coder Social logo

cemalgnlts / mailjs Goto Github PK

View Code? Open in Web Editor NEW
89.0 3.0 20.0 216 KB

This repo allows you to automate the registration process at the various sites which do require email confirmation for testing purposes.

License: MIT License

JavaScript 14.34% TypeScript 85.66%
temp-mail mail mail-api

mailjs's Introduction

Hi there ๐Ÿ‘‹

My name is Cemal (@cemalgnlts), I am a 24 year old developer from Tรผrkiye (๐Ÿ‡น๐Ÿ‡ท). I mostly do Web Developement.

mailjs's People

Contributors

asyncfox avatar cemalgnlts avatar shivam1608 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mailjs's Issues

createOneAccount() types are not correct

I'm new to TypeScript, so I'm not sure if this is a bug.
When I try to access the returned object of createOneAccount(), it doesn't recognize the data.username, just the data.

async createEmail() {
  const mailAccount = await this.mailJS.createOneAccount();
  return mailAccount;
}

image
image

Setting a token

Hi, I was wondering if would it be possible to create a method to set the token? Currently, the token has a private type so you can't override it. I want to do this because then I can store the token in localStorage and reauthenticate with the client, keeping the user signed in and not having to login every time. (p.s. not sure how long the JWT token actually lasts for, so it may not be ideal.)

Let me know what you think and if there's another way to keep the user logged in.

Make eventsource.min.js really optional

The README says this about eventsource.min.js:

<!-- you can exlude this if not listening to events (may cause runtime error) -->

But the way it is bundled, it always throws an EventSourcePolyfill is not defined error even if you don't use events.

You should change the output.globals.eventsource rollup config value from EventSourcePolyfill to globalThis.EventSourcePolyfill so it just resolves to undefined when missing instead of throwing an error. Then indeed the error will only happen when you try to use events and not every time.

Latest version does not work for browser

The quickstart code from the readme gives errors when ran in a browser.
The code:

<script src="https://cdn.jsdelivr.net/gh/cemalgnlts/Mailjs@latest/mailjs.min.js"></script>

<!-- you can exlude this if not listening to events (may cause runtime error) -->
<script src="https://cdn.jsdelivr.net/gh/cemalgnlts/Mailjs@latest/eventsource.min.js"></script>

<script>
	const mailjs = new Mailjs();
</script>

The errors: Uncaught ReferenceError: EventSourcePolyfill is not defined on line 1 of mailjs.min.js and Uncaught TypeError: Mailjs is not a constructor on line 6 of the example code.

The example in the examples folder works fine. This is because that example uses version 2.0. Changing "latest" in the quickstart code to 2.0 makes it work. But then I'm unfortunately missing out from the new features in 2.2.

CDNs do not include mailjs.min.js built for use in browser

Check out https://unpkg.com/@cemalgnlts/mailjs/ or https://cdn.jsdelivr.net/npm/@cemalgnlts/mailjs/

They are pretty barebones compared to the git repo, because of the files field in the package.json. Most notably, they lack the mailjs.min.js needed for use in browsers.

In the README example for use in browser, you give a jsdeliver link that uses special syntax for the github repo instead of the npm package, but people searching for the module on the cdn normally may not think to do so.

Perhaps you should add mailjs.min.js to files and/or browser field and/or move it to dist folder to make the module more easily usable in browsers without people having to look up the example with using jsdeliver special syntax for github?

expose response status code in IResult

Hi! Thanks for the great library!

I think it would be great if the IResult would also expose the response status-code as currently it's pretty hard to debug why a request is failing.

Delete Multiple emails

If I have to delete many emails, I had to delete one after the other.

Can batch deletion be implemented? Just an enhancement to the system.

Nice job.

handle rate-limit errors internally

Currently when I get rate-limited, I get this result { status: false, message: undefined, data: '' }.

I'd suggest the client handles rate limits internally by retrying the request after 1s

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.