-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Order confirmation send mail not work #3116
Comments
I assume you're entering your actual smtp credentials and not the example credentials given above? Because those of course will not work. Is there an error shown in the console where Vendure is running? |
Correct. I changed the smtp credential in my post. |
Also tried to enable debug log for SMTP, but nothing shows up from console. |
Any idea how to make it works? or do i miss anything? |
If I were troubleshooting, I would first make sure the template exists under 'vendure/static/email/templates/order-confirmation'. Then I would copy the template somewhere else and use the default template to make sure it is not a template compilation issue. If still no luck, I would change the config for the email plugin to use the dev mailbox to see if it is maybe an smtp issue.
If still no luck, I would make a new folder with a brand new Vendure install and then make changes one by one to try troubleshooting the issue that way. |
If you changed the header and/or footer partial, also copy those somewhere else and use the default. Those can cause compilation issues, too. Invalid mjml or hbs will cause the templates to not compile, so the message will not be sent. |
Thanks @pevey |
Try starting with a fresh project and link to the repo with a reproduction of the issue. There's nothing much the vendure team can do without being able to reproduce the error. Starting from a fresh project and changing only the email settings might help you pinpoint the issue. |
Still not able to getting the console log for order confirmation email.
Console log shows:
|
I have the same error ( The 'X-Forwarded-For' header is set but the Express 'trust proxy' setting is false (default)) in my log when trying to start project with Kubernetes. I use ingress with nginx controller
but no luck, throw me error "TypeError: app.set is not a function" Also tried this also
Different error this time "TypeError: app.getHttpAdapter is not a function" |
Did you ever get this working @Balex70? |
An important note here is that email sending is done by the worker, not the server. Ensure your worker process is running when testing this out. |
Thanks @michaelbromley - Im having the issue in general. App is deployed to ECS/Cloudfront. Heres some logs [server] ValidationError: The 'X-Forwarded-For' header is set but the Express 'trust proxy' setting is false (default). This could indicate a misconfiguration which would prevent express-rate-limit from accurately identifying users. See https://express-rate-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR/ for more information.
[server] at Object.xForwardedForHeader (/usr/src/app/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:187:13)
[server] at wrappedValidations.<computed> [as xForwardedForHeader] (/usr/src/app/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:398:22)
[server] at Object.keyGenerator (/usr/src/app/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:671:20)
[server] at /usr/src/app/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:724:32
[server] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[server] at async /usr/src/app/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:704:5 {
[server] code: 'ERR_ERL_UNEXPECTED_X_FORWARDED_FOR',
[server] help: 'https://express-rate-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR/'
[server] }
[server] info 1/15/25, 6:33 AM - [Vendure Server] ================================================
[server] info 1/15/25, 6:33 AM - [Vendure Server] Admin UI: http://localhost:3000/admin
[server] info 1/15/25, 6:33 AM - [Vendure Server] Dev mailbox: http://localhost:3000/mailbox |
this indicates that Vendure is configured with the EmailPlugin in dev mode, which means emails will not be sent, but will be saved as files Just making sure here - are you reporting that emails do not work for you, or are you commenting related to the "trust proxy" error. Or both? |
Not yet, for now, I'm working on local only and using docker. Maybe I will get back to kubernetes later |
Sorry for confusion - my comments are purely for the trust proxy error . I havent used the emails yet. |
I got this working by adding the following to vendure config
|
Describe the bug
Vendure doesn't send order confirmation email.
My setting for email plugin as below:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: