update zoho url
This commit is contained in:
@@ -11,7 +11,7 @@ export async function getToken() {
|
||||
}
|
||||
|
||||
const res = await axios({
|
||||
url: `https://accounts.zoho.com/oauth/v2/token?refresh_token=${process.env.ZOHO_REFRESH_TOKEN}&grant_type=refresh_token&client_id=${process.env.ZOHO_CLIENT_ID}&client_secret=${process.env.ZOHO_CLIENT_SECRET}`,
|
||||
url: `https://accounts.zoho.eu/oauth/v2/token?refresh_token=${process.env.ZOHO_REFRESH_TOKEN}&grant_type=refresh_token&client_id=${process.env.ZOHO_CLIENT_ID}&client_secret=${process.env.ZOHO_CLIENT_SECRET}`,
|
||||
method: "POST",
|
||||
});
|
||||
|
||||
@@ -35,13 +35,13 @@ export async function sendMail(
|
||||
const token = await getToken();
|
||||
|
||||
const res = await axios({
|
||||
url: `https://mail.zoho.com/api/accounts/${process.env.ZOHO_ACCOUNT_ID}/messages`,
|
||||
url: `https://mail.zoho.eu/api/accounts/${process.env.ZOHO_ACCOUNT_ID}/messages`,
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: `Zoho-oauthtoken ${token}`,
|
||||
},
|
||||
data: {
|
||||
fromAddress: "akhil.reddy@qualyval.com",
|
||||
fromAddress: "qp.automation@saveefforts.com",
|
||||
toAddress: to,
|
||||
subject,
|
||||
content: body,
|
||||
|
||||
Reference in New Issue
Block a user