https://github.com/anthonynahas/ngx-mailto
Angular library simplifying generation of mailto links with TS
https://github.com/anthonynahas/ngx-mailto
angular email email-sender mailto ngx
Last synced: about 1 year ago
JSON representation
Angular library simplifying generation of mailto links with TS
- Host: GitHub
- URL: https://github.com/anthonynahas/ngx-mailto
- Owner: AnthonyNahas
- License: mit
- Created: 2020-11-25T20:34:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-19T09:41:34.000Z (over 2 years ago)
- Last Synced: 2025-04-20T00:23:26.668Z (about 1 year ago)
- Topics: angular, email, email-sender, mailto, ngx
- Language: TypeScript
- Homepage: https://anthonynahas.github.io/ngx-mailto
- Size: 4.93 MB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ngx-mailto - Angular library simplifying generation of mailto links with Typescript
[](https://badge.fury.io/js/ngx-mailto)
[](https://anthonynahas.github.io/ngx-mailto)
[](https://anthonynahas.github.io/ngx-mailto/doc/index.html)
[](https://gitter.im/angular-material-extensions/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://github.com/AnthonyNahas/ngx-mailto/blob/master/LICENSE)
from
to -->
## Built by and for developers :heart:
Do you have any question or suggestion ? Please do not hesitate to contact us!
Alternatively, provide a PR | open an appropriate issue [here](https://github.com/AnthonyNahas/ngx-mailto/issues)
If you like this project, support [angular-material-extensions](https://github.com/angular-material-extensions)
by starring :star: and sharing it :loudspeaker:
## Table of Contents
- [Demo](#demo)
- [Dependencies](#dependencies)
- [Installation](#installation)
- [API](#api)
- [Usage](#usage)
- [Run Demo App Locally](#run-demo-app-locally)
- [Other Angular Libraries](#other-angular-libraries)
- [Support](#support)
- [License](#license)
## [Demo](https://anthonynahas.github.io/ngx-mailto)
View all the directives and components in action at [https://anthonynahas.github.io/ngx-mailto](https://anthonynahas.github.io/ngx-mailto)
---
## Dependencies
* [Angular](https://angular.io) developed and tested with `15.x`
---
## [Installation](https://anthonynahas.github.io/ngx-mailto/getting-started)
## 1. Install via *ng add*. (Recommended)
Now add the library via the `angular schematics`
```shell
ng add ngx-mailto
```
## 2. Install via *npm*. (Alternative)
Now install `ngx-mailto` via:
```shell
npm install --save ngx-mailto
```
### Import the library
If you installed the library via angular schematics, you can skip this step
```typescript
import { NgxMailtoModule } from 'ngx-mailto';
@NgModule({
declarations: [AppComponent, ...],
imports: [NgxMailtoModule, ...],
bootstrap: [AppComponent]
})
export class AppModule {
}
```
Other modules in your application like for lazy loading import ` NgxMailtoModule ` into your feature module:
## API
```typescript
interface Mailto {
receiver?: string | string[];
subject?: string;
cc?: string | string[];
bcc?: string | string[];
body?: string;
}
```
## [Usage](https://anthonynahas.github.io/ngx-mailto)
#### via service `NgxMailtoService`
```html
Try Me!
```
```typescript
import { Mailto, NgxMailtoService } from 'ngx-mailto';
emails: string[] = ['your_email@domain.de'];
cc: string[] = [];
bcc: string[] = [];
subject!: string;
body!: string;
mailto: Mailto = {
receiver: this.emails,
cc: this.cc,
bcc: this.bcc,
subject: undefined,
body: undefined
};
constructor(private mailtoService: NgxMailtoService) {
}
open(): void {
this.mailtoService.open(this.mailto);
}
```
#### via pipe `mailto`
```html
Try me!
```
### Run Demo App Locally
Build the library
```bash
$ npm run build:lib
```
Serve the demo app
```bash
$ npm start
```
## Other Angular Libraries
- [ngx-auth-firebaseui](https://github.com/AnthonyNahas/ngx-auth-firebaseui)
- [ngx-linkifyjs](https://github.com/AnthonyNahas/ngx-linkifyjs)
- [@angular-material-extensions/password-strength](https://github.com/angular-material-extensions/password-strength)
- [@angular-material-extensions/google-maps-autocomplete](https://github.com/angular-material-extensions/google-maps-autocomplete)
- [@angular-material-extensions/link-preview](https://github.com/angular-material-extensions/link-preview)
- [@angular-material-extensions/fab-menu](https://github.com/angular-material-extensions/fab-menu)
- [@angular-material-extensions/select-country](https://github.com/angular-material-extensions/select-country)
- [@angular-material-extensions/select-icon](https://github.com/angular-material-extensions/select-icon)
- [@angular-material-extensions/pages](https://github.com/angular-material-extensions/pages)
- [@angular-material-extensions/contacts](https://github.com/angular-material-extensions/contacts)
---
## Support
+ Drop an email to: [Anthony Nahas](mailto:anthony.na@hotmail.de)
+ or open an appropriate [issue](https://github.com/angular-material-extensions/ngx-mailto/issues)
+ let us chat on [Gitter](https://gitter.im/angular-material-extensions/Lobby)
Built by and for developers :heart: we will help you :punch:
---
## Who is using ngx-mailto? Awesome apps?
1. [Nahaus.de](https://nahaus.de)
Are you missing your project or you app? PR me to publish it on the README
---

This project is supported by [jetbrains](https://www.jetbrains.com/) with 1 ALL PRODUCTS PACK OS LICENSE incl. [webstorm](https://www.jetbrains.com/webstorm)
---
## License
Copyright (c) 2022 [Anthony Nahas](https://github.com/AnthonyNahas). Licensed under the MIT License (MIT)