如何解决如何在 Gmail 邮件中添加电子邮件标记? | Gmail 收件箱操作
我正在尝试将操作按钮添加到 Gmail 邮件中,但是它根本没有出现。 我正在使用 Oracle Eloqua 并将测试电子邮件从客户端实例发送到我的 gmail 收件箱。
特别想对交易电子邮件尝试此操作,看看我们是否可以通过将用户引导至付款发票而不是让他们打开带有强制性合规 CTA 取消的电子邮件来减少取消/流失的次数。
>由于上面提供的信息,我依赖以下来源。 https://developers.google.com/gmail/markup/reference/invoice#json-ld
此外,我一直在使用 Email Markup Tester 测试标记,结果表明我的代码是正确的。 如果是这样,电子邮件不包含任何促销内容。 我应该同时添加 html 和 json 还是只添加 json 就足够了?
const multer = require('multer');
const storage = multer.diskStorage({
destination: function (req,file,cb) {
cb(null,'./uploads');
},filename: function (req,file.originalname);
}
});
const uploadImg = multer({storage: storage}).single('image');
//import tea model
const Tea = require('../models/image');
// newTea function for post image route
const newImage = (req,res,next) => {
res.json({message: "POST new image"}); // dummy function for Now
};
const newImage2 = (req,next) => {
res.json({message: "POST new image2"}); // dummy function for Now
};
//GET '/tea'
const getAllTea = (req,next) => {
//check if the tea name already exists in db
//Tea.findOne({name:req.body.name},(data)=>{
//if tea not in db,add it
//if(data===null){
//create a new tea object using the Tea model and req.body
const newTea = new Tea({
name:req.body.name,image: req.body.image,// placeholder for Now
description: req.body.description,keywords: req.body.keywords,origin: req.body.origin,brew_time: req.body.brew_time,temperature: req.body.temperature,})
// save this object to database
//newTea.save((err,data)=>{
// if(err) return res.json({Error: err});
// return res.json(data);
//})
//if tea is in db,return a message to inform it exists
//}else{
return res.json(newTea);
//}
//})
};
//POST '/tea'
const newTea = (req,next) => {
//check if the tea name already exists in db
Tea.findOne({name:req.body.name},(data)=>{
//if tea not in db,add it
if(data===null){
console.log("new object is creating");
//create a new tea object using the Tea model and req.body
const newTea = new Tea({
name:req.body.name,image: req.file.path // placeholder for Now
//description: req.body.description,//keywords: req.body.keywords,//origin: req.body.origin,//brew_time: req.body.brew_time,//temperature: req.body.temperature,})
// save this object to database
newTea.save((err,data)=>{
if(err) return res.json({Error: err});
console.log("saved");
return res.json(data);
})
//if tea is in db,return a message to inform it exists
}else{
console.log("not saved");
return res.json(newTea);
}
})
}
//DELETE '/tea'
const deleteallTea = (req,next) => {
res.json({message: "DELETE all tea"});
};
//GET '/tea/:name'
const getoneTea = (req,next) => {
res.json({message: "GET 1 tea"});
};
//POST '/tea/:name'
const newComment = (req,next) => {
res.json({message: "POST 1 tea comment"});
};
//DELETE '/tea/:name'
const deleteOneTea = (req,next) => {
res.json({message: "DELETE 1 tea"});
};
module.exports = {newImage,newImage2,getAllTea,newTea,deleteallTea,getoneTea,newComment,deleteOneTea,uploadImg};
任何帮助将不胜感激! 谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。