forwardemail / forwardemail/forwardemail.net

[feat] Sample Documentation update for encrypt API

Open
#320 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
1.7k
Forks
203
PR merge metrics
No merged PRs in 30d

Description

## Describe the feature

In the https://forwardemail.net/en/email-api#encrypt sample, it suggests

```
curl -X POST https://api.forwardemail.net/v1/encrypt \
-d "input=user@gmail.com"
```

But when using regex matching for $1, it tries to use a shell variable expansion instead of as a literal $1. I would suggest using 'single quotes' instead - otherwise after a few minutes it bounces with an _'invalid "forward-email" TXT record due to an invalid regular expression email address match>'_.

```
curl -X POST https://api.forwardemail.net/v1/encrypt -d 'input=/^(alias1|alias2)$/:user+$1@gmail.com'
```

## Checklist

- [x] I have searched through GitHub issues for similar issues.
- [x] I have completely read through the README and documentation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.