如何在 Gmail 邮件中添加电子邮件标记? | Gmail 收件箱操作

问题描述

我正在尝试将操作按钮添加到 Gmail 邮件中,但是它根本没有出现。 我正在使用 Oracle Eloqua 并将测试电子邮件从客户端实例发送到我的 gmail 收件箱。

特别想对交易电子邮件尝试此操作,看看我们是否可以通过将用户引导至付款发票而不是让他们打开带有强制性合规 CTA 取消的电子邮件来减少取消/流失的次数

>

由于上面提供的信息,我依赖以下来源。 https://developers.google.com/gmail/markup/reference/invoice#json-ld

此外,我一直在使用 Email Markup Tester 测试标记,结果表明我的代码是正确的。 如果是这样,电子邮件不包含任何促销内容我应该同时添加 html 和 json 还是只添加 json 就足够了?

这是我粘贴到代码中的标记 (json-ld):

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 (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...