We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've been getting this error when i try to send emails.
So i did a set up on digital ocean droplet, installed nginx and every other thing i need.
API works fine, but when it gets to sending emails it fails
This is my logic for sending email
`import 'dotenv/config'; import { sendGridConfig } from '../config/config'; import sgMail from '@sendgrid/mail';
sgMail.setApiKey(sendGridConfig.apiKey);
export const sendMail = async ( to: string, name: string, data: any, templateId: string ) => { try { await sgMail.send({ to, from: sendGridConfig.sender, templateId, dynamic_template_data: data, }); console.log("Email Sent Successfully"); } catch (err) { console.error("SendGrid Error:", err.response?.body || err.message); throw new Error("Email Failed to Send"); } };`
Sendrid mail version => 7.7.0 downgraded from 8.8.0 both version fails
Nodejs version => v20.16.0 Nginx version => nginx/1.26.0 (Ubuntu) Yarn version => 1.22.22
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I've been getting this error when i try to send emails.
So i did a set up on digital ocean droplet, installed nginx and every other thing i need.
API works fine, but when it gets to sending emails it fails
This is my logic for sending email
`import 'dotenv/config';
import { sendGridConfig } from '../config/config';
import sgMail from '@sendgrid/mail';
sgMail.setApiKey(sendGridConfig.apiKey);
export const sendMail = async (
to: string,
name: string,
data: any,
templateId: string
) => {
try {
await sgMail.send({
to,
from: sendGridConfig.sender,
templateId,
dynamic_template_data: data,
});
console.log("Email Sent Successfully");
} catch (err) {
console.error("SendGrid Error:", err.response?.body || err.message);
throw new Error("Email Failed to Send");
}
};`
Sendrid mail version => 7.7.0
downgraded from 8.8.0 both version fails
Nodejs version => v20.16.0
Nginx version => nginx/1.26.0 (Ubuntu)
Yarn version => 1.22.22
The text was updated successfully, but these errors were encountered: