-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError: Unexpected token M in JSON at position 0 #109
Comments
getting this exact same error I have tried stripping all code down to the bare bones example as per docs (and you have above) and getting the same error.
|
Possibly connected to this issue. mailgun/mailgun.js#134 see this comment mailgun/mailgun.js#134 (comment) it has to do with the format of the domain. |
@mdakovac could you try to use your real domain instead of a sandbox domain and report back if that has fixed it? then we can update the docs! |
I fixed this error like this=> In the domain, add your app's url, Do not add https , for example => sample.herokuapp.com const auth = {
auth: {
api_key: "Your api key",
domain: "sample.herokuapp.com",
url: "https://api.mailgun.net/v3"
}
};
const nodemailerMailgun = nodemailer.createTransport(mg(auth)); |
I had the same error...
|
I get this error when trying to run the basic example:
versions:
"nodemailer": "^6.6.1",
"nodemailer-mailgun-transport": "^2.1.3",
node: 12
full error:
The text was updated successfully, but these errors were encountered: