我使用sendgrid制作以下模板:
要使用我的节点服务器发送它,我创建了以下模块:
/**
* Created by root on 6/6/16.
*/
var path = require('path'),
emailTemplates = require('email-templates'),
async = require("async"),
mailConfig = require('../config/email.json'),
templates = require('../config/emailTemplates.json'),
_ = require('lodash'),
sendgrid = require('sendgrid')(mailConfig.sendGridApiKey);
var mymailer = {};
/**
* Sends an email to either one or multiple users
* @param template_id (The id key of the template. Can be found in emailTemplates.json
* @param to String or Array
* @param from String
* @param subject String
* @param keyReplacer Array of objects for keys to replace in the template
*/
mymailer.sendTemplate = function (template_id, to, from, subject, keyReplacer, text) {
var email = new sendgrid.Email();
var templateKey = templates[template_id];
if (templateKey) {
email.setSmtpapiTos(to);
email.subject = subject;
email.from = from;
email.text = text;
email.html = '';
email.setFilters({
'templates': {
'settings': {
'enable': 1,
'template_id': templateKey
}
}
});
email.smtpapi.header.sub = createSub(keyReplacer);
sendgrid.send(email);
}
else {
console.log('incorrect key');
}
};
function createSub(keyReplacer) {
var finalObject = {};
if (keyReplacer) {
_.forEach(keyReplacer, function (value, key) {
var k = ':' + key;
finalObject[k] = [value];
})
}
return finalObject;
}
module.exports = mymailer;
然而,当我收到我的电子邮件时,它会从CSS和图像中删除。
看起来像这样:
我猜它的一些设置我不知道但我不知道哪个。任何人都可以帮助我吗?
模板html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" data-dnd="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<!--<![endif]-->
<!--[if (gte mso 9)|(IE)]><style type="text/css">
table {border-collapse: collapse;}
table, td {mso-table-lspace: 0pt;mso-table-rspace: 0pt;}
img {-ms-interpolation-mode: bicubic;}
</style>
<![endif]-->
<style type="text/css">
body {
color: #000000;
}
body a {
color: #0071cb;
text-decoration: none;
}
p { margin: 0; padding: 0; }
table[class="wrapper"] {
width:100% !important;
table-layout: fixed;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
img[class="max-width"] {
max-width: 100% !important;
}
@media screen and (max-width:480px) {
.preheader .rightColumnContent,
.footer .rightColumnContent {
text-align: left !important;
}
.preheader .rightColumnContent div,
.preheader .rightColumnContent span,
.footer .rightColumnContent div,
.footer .rightColumnContent span {
text-align: left !important;
}
.preheader .rightColumnContent,
.preheader .leftColumnContent {
font-size: 80% !important;
padding: 5px 0;
}
table[class="wrapper-mobile"] {
width: 100% !important;
table-layout: fixed;
}
img[class="max-width"] {
height: auto !important;
}
a[class="bulletproof-button"] {
display: block !important;
width: auto !important;
font-size: 80%;
padding-left: 0 !important;
padding-right: 0 !important;
}
// 2 columns
#templateColumns{
width:100% !important;
}
.templateColumnContainer{
display:block !important;
width:100% !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
}
</style>
<style>
body, p, div { font-family: arial,sans-serif; }
</style>
<style>
body, p, div { font-size: 14px; }
</style>
</head>
<body yahoofix="true" style="min-width: 100%; margin: 0; padding: 0; font-size: 14px; font-family: arial,sans-serif; color: #000000; background-color: #0071CB; color: #000000;" data-attributes='%7B%22dropped%22%3Atrue%2C%22bodybackground%22%3A%22%230071CB%22%2C%22bodyfontname%22%3A%22arial%2Csans-serif%22%2C%22bodytextcolor%22%3A%22%23000000%22%2C%22bodylinkcolor%22%3A%22%230071cb%22%2C%22bodyfontsize%22%3A14%7D'>
<center class="wrapper">
<div class="webkit">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="wrapper" bgcolor="#0071CB">
<tr><td valign="top" bgcolor="#0071CB" width="100%">
<!--[if (gte mso 9)|(IE)]>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table width="100%" role="content-container" class="outer" data-attributes='%7B%22dropped%22%3Atrue%2C%22containerpadding%22%3A%220%2C0%2C0%2C0%22%2C%22containerwidth%22%3A600%2C%22containerbackground%22%3A%22%23FFFFFF%22%7D' align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="100%"><table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<!--[if (gte mso 9)|(IE)]>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<![endif]-->
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="width: 100%; max-width:600px;" align="center">
<tr><td role="modules-container" style="padding: 0px 0px 0px 0px; color: #000000; text-align: left;" bgcolor="#FFFFFF" width="100%" align="left">
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="display:none !important; visibility:hidden; opacity:0; color:transparent; height:0; width:0;" class="module preheader preheader-hide" role="module" data-type="preheader">
<tr><td role="module-content"><p></p></td></tr>
</table>
<table class="module" role="module" data-type="wysiwyg" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;" data-attributes='%7B%22dropped%22%3Atrue%2C%22padding%22%3A%220%2C0%2C0%2C0%22%2C%22containerbackground%22%3A%22%23ffffff%22%7D'>
<tr><td role="module-content" style="padding: 0px 0px 0px 0px;" bgcolor="#ffffff"><div><%body%></div></td></tr></table>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" class="module wrapper" role="module" data-type="imagetext" data-attributes='%7B%22dropped%22%3Atrue%2C%22imagebackground%22%3A%22%23ffffff%22%2C%22imagemargin%22%3A%220%2C0%2C0%2C0%22%2C%22textbackground%22%3A%22%23ffffff%22%2C%22textmargin%22%3A%220%2C0%2C0%2C0%22%2C%22imagealignment%22%3A%22left%22%7D'>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr role="module-content">
<td align="center" valign="top" width="50%" height="100%" class="templateColumnContainer" bgcolor="#ffffff" >
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td class="leftColumnContent" role="column-one" height="100%" style="height:100%;width:50%; padding: 0px 0px 0px 0px;"><table role="module" data-type="image" border="0" align="center" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;" class="wrapper" data-attributes='%7B%22child%22%3Atrue%2C%22link%22%3A%22%22%2C%22width%22%3A%22250%22%2C%22height%22%3A%22333%22%2C%22imagebackground%22%3A%22%23ffffff%22%2C%22url%22%3A%22https%3A//marketing-image-production.s3.amazonaws.com/uploads/e4f73dd0d8cd27c174bae4dce1f04e4db74721c83cfd297559428dceb682cd79f2b565aa0bcacfb7175b27be1b4d5d10f112847379aa271aeb56760ad33e36c3.jpg%22%2C%22alt_text%22%3A%22%22%2C%22dropped%22%3Atrue%2C%22imagemargin%22%3A%220%2C0%2C0%2C0%22%2C%22alignment%22%3A%22%22%2C%22responsive%22%3Afalse%7D'>
<tr>
<td style="font-size:6px;line-height:10px;background-color:#ffffff;padding: 0px 0px 0px 0px;" valign="top" align="" role="module-content">
<img class="max-width" width="250" height="333" src="https://marketing-image-production.s3.amazonaws.com/uploads/e4f73dd0d8cd27c174bae4dce1f04e4db74721c83cfd297559428dceb682cd79f2b565aa0bcacfb7175b27be1b4d5d10f112847379aa271aeb56760ad33e36c3.jpg" alt="" border="0" style="display: block; color: #000; text-decoration: none; font-family: Helvetica, arial, sans-serif; font-size: 16px; " />
</td>
</tr>
</table></td>
</tr>
</table>
</td>
<td align="center" valign="top" width="50%" height="100%" class="templateColumnContainer" bgcolor="#ffffff" >
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td class="rightColumnContent" role="column-two" height="100%" style="height:100%;width:50%; padding: 0px 0px 0px 0px;"><table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" style="table-layout: fixed;" data-attributes='%7B%22dropped%22%3Atrue%2C%22child%22%3Atrue%2C%22padding%22%3A%220%2C0%2C0%2C0%22%2C%22containerbackground%22%3A%22%23ffffff%22%7D'>
<tr>
<td role="module-content" valign="top" height="100%" style="padding: 0px 0px 0px 0px;" bgcolor="#ffffff"><div>Hello world</div> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" role="module" data-type="columns" data-attributes='%7B%22dropped%22%3Atrue%2C%22columns%22%3A2%2C%22padding%22%3A%220%2C0%2C0%2C0%22%2C%22cellpadding%22%3A0%2C%22containerbackground%22%3A%22%22%7D'>
<tr><td style="padding: 0px 0px 0px 0px;" bgcolor="">
<table class="columns--container-table" border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
<tr role="module-content">
<td style="padding: 0px 0px 0px 0px" role="column-0" align="center" valign="top" width="50%" height="100%" class="templateColumnContainer column-drop-area empty">
</td><td style="padding: 0px 0px 0px 0px" role="column-1" align="center" valign="top" width="50%" height="100%" class="templateColumnContainer column-drop-area ">
<table class="module" role="module" data-type="button" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;" data-attributes='%7B%22dropped%22%3Atrue%2C%22borderradius%22%3A6%2C%22buttonpadding%22%3A%2212%2C18%2C12%2C18%22%2C%22text%22%3A%22Your%20Bulletproof%20Button%22%2C%22alignment%22%3A%22center%22%2C%22fontsize%22%3A16%2C%22url%22%3A%22%22%2C%22height%22%3A%22%22%2C%22width%22%3A%22%22%2C%22containerbackground%22%3A%22%23ffffff%22%2C%22padding%22%3A%220%2C0%2C0%2C0%22%2C%22buttoncolor%22%3A%22%231188e6%22%2C%22textcolor%22%3A%22%23ffffff%22%2C%22bordercolor%22%3A%22%231288e5%22%7D'>
<tr>
<td style="padding: 0px 0px 0px 0px;" align="center" bgcolor="#ffffff">
<table border="0" cellpadding="0" cellspacing="0" class="wrapper-mobile">
<tr>
<td align="center" style="-webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; font-size: 16px;" bgcolor="#1188e6">
<a href="" class="bulletproof-button" target="_blank" style="height: px; width: px; font-size: 16px; line-height: px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; padding: 12px 18px 12px 18px; text-decoration: none; color: #ffffff; text-decoration: none; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; border: 1px solid #1288e5; display: inline-block;">Your Bulletproof Button</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table><table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" class="module footer" role="module" data-type="footer" data-attributes='%7B%22dropped%22%3Atrue%2C%22columns%22%3A1%2C%22padding%22%3A%2210%2C5%2C10%2C5%22%2C%22containerbackground%22%3A%22%23ffffff%22%7D'>
<tr><td style="padding: 10px 5px 10px 5px;" bgcolor="#ffffff">
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
<tr role="module-content">
<td align="center" valign="top" width="100%" height="100%" class="templateColumnContainer">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td class="leftColumnContent" role="column-one" height="100%" style="height:100%;"><table class="module" role="module" data-type="text" border="0" cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;" data-attributes='%7B%22dropped%22%3Atrue%2C%22child%22%3Afalse%2C%22padding%22%3A%220%2C0%2C0%2C0%22%2C%22containerbackground%22%3A%22%23ffffff%22%7D'>
<tr>
<td role="module-content" valign="top" height="100%" style="padding: 0px 0px 0px 0px;" bgcolor="#ffffff"><div style="font-size:12px;line-height:150%;margin:0;text-align:center;">
This email was sent by: [Sender_Name] [Sender_Address], [Sender_City] [Sender_State] [Sender_Zip]
</div>
<div style="font-size:12px;line-height:150%;margin:0;text-align:center;">
To unsubscribe click: <a href="[Unsubscribe]">here</a>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
</tr></td>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</td>
</table>
<![endif]-->
</td>
</tr>
</table></td>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</tr></td>
</table>
</div>
</center>
</body>
</html>
答案 0 :(得分:4)
您的代码存在问题,电子邮件客户端不支持嵌入式CSS。因此,您需要的所有样式必须与标记内联。也可能是丑陋的,但布局电子邮件模板的最佳方法是使用表格。
但是,这里有一些可能对您有所帮助的问题。
<强> TIPS 强>
这不起作用:
<style media="screen">
h1{
color: red;
}
</style>
<h1>I like turtles</h1>
这将有效:
<h1 style="color:red;">I like turtles</h1>
有用的来源
您可以阅读此内容以了解有关创建电子邮件模板的详情。
此外,还有一些内联将您的嵌入式CSS转换为内联css。我个人使用Zurb's email inliner来解决这个问题。
我只能这样说,我希望这会让你到达某个地方。祝你好运:)
答案 1 :(得分:2)
我有这个问题,我通过更改
修复了它using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Data;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
class Program
{
const string FILENAME = @"c:\temp\test.txt";
static void Main(string[] args)
{
new Order(FILENAME);
}
}
public class Order
{
[ScaffoldColumn(false)]
public int Id { get; set; }
public string SLOCATION { get; set; }
public string MQUOTE { get; set; }
public string MCPAYDATE { get; set; }
public string MTAXNO { get; set; }
public string MCOUNTY { get; set; }
public string MCUSTCAT { get; set; }
public int MRREF { get; set; }
public int MLREF { get; set; }
public int MLREC { get; set; }
public decimal MSUBTOT { get; set; }
public string MCALL { get; set; }
public string PCATA { get; set; }
public string PCATB { get; set; }
public string PCATC { get; set; }
public string PCATD { get; set; }
public bool PCATE { get; set; }
public bool PCATF { get; set; }
public bool PCATG { get; set; }
public bool PCATH { get; set; }
public bool PCATI { get; set; }
public bool PCATJ { get; set; }
public bool PCATK { get; set; }
public bool PCATL { get; set; }
public bool PCATM { get; set; }
public bool PCATN { get; set; }
public bool PCATO { get; set; }
public int PQUANA { get; set; }
public int PQUANB { get; set; }
public int PQUANC { get; set; }
public int PQUAND { get; set; }
public bool PQUANE { get; set; }
public bool PQUANF { get; set; }
public bool PQUANG { get; set; }
public bool PQUANH { get; set; }
public bool PQUANI { get; set; }
public bool PQUANJ { get; set; }
public bool PQUANK { get; set; }
public bool PQUANL { get; set; }
public bool PQUANM { get; set; }
public bool PQUANN { get; set; }
public bool PQUANO { get; set; }
public string PDONEA { get; set; }
public string PDONEB { get; set; }
public string PDONEC { get; set; }
public string PDONED { get; set; }
public bool PDONEE { get; set; }
public bool PDONEF { get; set; }
public bool PDONEG { get; set; }
public bool PDONEH { get; set; }
public bool PDONEI { get; set; }
public bool PDONEJ { get; set; }
public bool PDONEK { get; set; }
public bool PDONEL { get; set; }
public bool PDONEM { get; set; }
public bool PDONEN { get; set; }
public bool PDONEO { get; set; }
public string PDTWOA { get; set; }
public string PDTWOB { get; set; }
public string PDTWOC { get; set; }
public string PDTWOD { get; set; }
public bool PDTWOE { get; set; }
public bool PDTWOF { get; set; }
public bool PDTWOG { get; set; }
public bool PDTWOH { get; set; }
public bool PDTWOI { get; set; }
public bool PDTWOJ { get; set; }
public bool PDTWOK { get; set; }
public bool PDTWOL { get; set; }
public bool PDTWOM { get; set; }
public bool PDTWON { get; set; }
public bool PDTWOO { get; set; }
public decimal PUNITA { get; set; }
public int PUNITB { get; set; }
public int PUNITC { get; set; }
public int PUNITD { get; set; }
public int PUNITE { get; set; }
public int PUNITF { get; set; }
public int PUNITG { get; set; }
public int PUNITH { get; set; }
public int PUNITI { get; set; }
public int PUNITJ { get; set; }
public int PUNITK { get; set; }
public int PUNITL { get; set; }
public int PUNITM { get; set; }
public int PUNITN { get; set; }
public int PUNITO { get; set; }
public decimal PTOTALA { get; set; }
public int PTOTALB { get; set; }
public int PTOTALC { get; set; }
public int PTOTALD { get; set; }
public int PTOTALE { get; set; }
public int PTOTALF { get; set; }
public int PTOTALG { get; set; }
public int PTOTALH { get; set; }
public int PTOTALI { get; set; }
public int PTOTALJ { get; set; }
public int PTOTALK { get; set; }
public int PTOTALL { get; set; }
public int PTOTALM { get; set; }
public int PTOTALN { get; set; }
public int PTOTALO { get; set; }
public string XPTCK { get; set; }
public string MTUSER { get; set; }
public int SELECTNUM { get; set; }
public string SELECT { get; set; }
public string CONTINUE { get; set; }
public string MDATE { get; set; }
public string MPUDATE { get; set; }
public string MPAYDATE { get; set; }
public string MGONEDATE { get; set; }
public string MSHPNAME { get; set; }
public string MSHPCNME { get; set; }
public string MSHPAD1 { get; set; }
public string MSHPAD2 { get; set; }
public string MSHPCITY { get; set; }
public string MEMAIL { get; set; }
public string MPHOTO { get; set; }
public string MSHPST { get; set; }
public string MSTATE { get; set; }
public string MGONEPER { get; set; }
public string MSHPZIP { get; set; }
public string MZIP { get; set; }
public string MSHIPVIA { get; set; }
public string MPUTIME { get; set; }
public string MGONETIME { get; set; }
public string MCASH { get; set; }
public string MLETTER { get; set; }
public string MYTAX { get; set; }
public string MLABEL { get; set; }
public string MNUMBER { get; set; }
public string MINVNO { get; set; }
public string MCUSTPO { get; set; }
public string MSHIPFROM { get; set; }
public string MCONTACT { get; set; }
public string MPHONE { get; set; }
public string MFAX { get; set; }
public string MCELL { get; set; }
public string MCOMMENT { get; set; }
public string MCOMMENT1 { get; set; }
public string MACCTN { get; set; }
public string MSTREET { get; set; }
public string MCITY { get; set; }
public string MCHECKNO { get; set; }
public int MENGRAV { get; set; }
public decimal MTAX { get; set; }
public decimal MSHIPPING { get; set; }
public decimal MTOTAL { get; set; }
public decimal MPAYMENT { get; set; }
public string MCC { get; set; }
public string XSALESPER { get; set; }
public string MSNAME { get; set; }
public string MEVENTDTE { get; set; }
public string MOPENACCT { get; set; }
public string MPAYPERSON { get; set; }
public string ANS { get; set; }
public string MFILENAME { get; set; }
public Order() { }
public Order(string filename)
{
string patternNumber = @"\d+(.\d+)?";
//use string read instead of StreamReader if data is going from a web response
StreamReader reader = new StreamReader(filename);
string inputLine = "";
string type = "";
while ((inputLine = reader.ReadLine()) != null)
{
inputLine = inputLine.Trim();
if (inputLine.Length > 0)
{
if(!inputLine.StartsWith("\""))
{
string name = inputLine.Substring(0, 12).Trim();
type = inputLine.Substring(12, 9).Trim();
string value = inputLine.Substring(21).Trim();
switch (type)
{
case "Pub C" :
Write(name, value.Replace("\"", "").Trim());
break;
case "Pub N":
string strNumber = Regex.Match(value, patternNumber).Value;
object num = strNumber.Contains(".") ? decimal.Parse(strNumber) : int.Parse(strNumber);
Write(name, num);
break;
case "Pub L":
bool true_false = value == ".F." ? false : true;
Write(name, true_false);
break;
}
}
}
}
}
public void Write(string name, object value)
{
switch(name)
{
case "Id" :
Id = Convert.ToInt32(value);
break;
case "SLOCATION" :
SLOCATION = (string)value;
break;
case "MQUOTE":
MQUOTE = (string)value;
break;
case "MCPAYDATE":
MCPAYDATE = (string)value;
break;
case "MTAXNO":
MTAXNO = (string)value;
break;
case "MCOUNTY":
MCOUNTY = (string)value;
break;
case "MCUSTCAT":
MCUSTCAT = (string)value;
break;
case "MRREF":
MRREF = Convert.ToInt32(value);
break;
case "MLREF":
MLREF = Convert.ToInt32(value);
break;
case "MLREC":
MLREC = Convert.ToInt32(value);
break;
case "MSUBTOT":
MSUBTOT = (decimal)value;
break;
case "MCALL":
MCALL = (string)value;
break;
case "PCATA":
PCATA = (string)value;
break;
case "PCATB":
PCATB = (string)value;
break;
case "PCATC":
PCATC = (string)value;
break;
case "PCATD":
PCATD = (string)value;
break;
case "PCATE":
PCATE = (bool)value;
break;
case "PCATF":
PCATF = (bool)value;
break;
case "PCATG":
PCATG = (bool)value;
break;
case "PCATH":
PCATH = (bool)value;
break;
case "PCATI":
PCATI = (bool)value;
break;
case "PCATJ":
PCATJ = (bool)value;
break;
case "PCATK":
PCATK = (bool)value;
break;
case "PCATL":
PCATL = (bool)value;
break;
case "PCATM":
PCATM = (bool)value;
break;
case "PCATN":
PCATN = (bool)value;
break;
case "PCATO":
PCATO = (bool)value;
break;
case "PQUANA":
PQUANA = Convert.ToInt32(value);
break;
case "PQUANB":
PQUANB = Convert.ToInt32(value);
break;
case "PQUANC":
PQUANC = Convert.ToInt32(value);
break;
case "PQUAND":
PQUAND = Convert.ToInt32(value);
break;
case "PQUANE":
PQUANE = (bool)value;
break;
case "PQUANF":
PQUANF = (bool)value;
break;
case "PQUANG":
PQUANG = (bool)value;
break;
case "PQUANH":
PQUANH = (bool)value;
break;
case "PQUANI":
PQUANI = (bool)value;
break;
case "PQUANJ":
PQUANJ = (bool)value;
break;
case "PQUANK":
PQUANK = (bool)value;
break;
case "PQUANL":
PQUANL = (bool)value;
break;
case "PQUANM":
PQUANM = (bool)value;
break;
case "PQUANN":
PQUANN = (bool)value;
break;
case "PQUANO":
PQUANO = (bool)value;
break;
case "PDONEA":
PDONEA = (string)value;
break;
case "PDONEB":
PDONEB = (string)value;
break;
case "PDONEC":
PDONEC = (string)value;
break;
case "PDONED":
PDONED = (string)value;
break;
case "PDONEE":
PDONEE = (bool)value;
break;
case "PDONEF":
PDONEF = (bool)value;
break;
case "PDONEG":
PDONEG = (bool)value;
break;
case "PDONEH":
PDONEH = (bool)value;
break;
case "PDONEI":
PDONEI = (bool)value;
break;
case "PDONEJ":
PDONEJ = (bool)value;
break;
case "PDONEK":
PDONEK = (bool)value;
break;
case "PDONEL":
PDONEL = (bool)value;
break;
case "PDONEM":
PDONEM = (bool)value;
break;
case "PDONEN":
PDONEN = (bool)value;
break;
case "PDONEO":
PDONEO = (bool)value;
break;
case "PDTWOA":
PDTWOA = (string)value;
break;
case "PDTWOB":
PDTWOB = (string)value;
break;
case "PDTWOC":
PDTWOC = (string)value;
break;
case "PDTWOD":
PDTWOD = (string)value;
break;
case "PDTWOE":
PDTWOE = (bool)value;
break;
case "PDTWOF":
PDTWOF = (bool)value;
break;
case "PDTWOG":
PDTWOG = (bool)value;
break;
case "PDTWOH":
PDTWOH = (bool)value;
break;
case "PDTWOI":
PDTWOI = (bool)value;
break;
case "PDTWOJ":
PDTWOJ = (bool)value;
break;
case "PDTWOK":
PDTWOK = (bool)value;
break;
case "PDTWOL":
PDTWOL = (bool)value;
break;
case "PDTWOM":
PDTWOM = (bool)value;
break;
case "PDTWON":
PDTWON = (bool)value;
break;
case "PDTWOO":
PDTWOO = (bool)value;
break;
case "PUNITA":
PUNITA = (decimal)value;
break;
case "PUNITB":
PUNITB = Convert.ToInt32(value);
break;
case "PUNITC":
PUNITC = Convert.ToInt32(value);
break;
case "PUNITD":
PUNITD = Convert.ToInt32(value);
break;
case "PUNITE":
PUNITE = Convert.ToInt32(value);
break;
case "PUNITF":
PUNITF = Convert.ToInt32(value);
break;
case "PUNITG":
PUNITG = Convert.ToInt32(value);
break;
case "PUNITH":
PUNITH = Convert.ToInt32(value);
break;
case "PUNITI":
PUNITI = Convert.ToInt32(value);
break;
case "PUNITJ":
PUNITJ = Convert.ToInt32(value);
break;
case "PUNITK":
PUNITK = Convert.ToInt32(value);
break;
case "PUNITL":
PUNITL = Convert.ToInt32(value);
break;
case "PUNITM":
PUNITM = Convert.ToInt32(value);
break;
case "PUNITN":
PUNITN = Convert.ToInt32(value);
break;
case "PUNITO":
PUNITO = Convert.ToInt32(value);
break;
case "PTOTALA":
PTOTALA = Convert.ToInt32(value);
break;
case "PTOTALB":
PTOTALB = Convert.ToInt32(value);
break;
case "PTOTALC":
PTOTALC = Convert.ToInt32(value);
break;
case "PTOTALD":
PTOTALD = Convert.ToInt32(value);
break;
case "PTOTALE":
PTOTALE = Convert.ToInt32(value);
break;
case "PTOTALF":
PTOTALF = Convert.ToInt32(value);
break;
case "PTOTALG":
PTOTALG = Convert.ToInt32(value);
break;
case "PTOTALH":
PTOTALH = Convert.ToInt32(value);
break;
case "PTOTALI":
PTOTALI = Convert.ToInt32(value);
break;
case "PTOTALJ":
PTOTALJ = Convert.ToInt32(value);
break;
case "PTOTALK":
PTOTALK = Convert.ToInt32(value);
break;
case "PTOTALL":
PTOTALL = Convert.ToInt32(value);
break;
case "PTOTALM":
PTOTALM = Convert.ToInt32(value);
break;
case "PTOTALN":
PTOTALN = Convert.ToInt32(value);
break;
case "PTOTALO":
PTOTALO = Convert.ToInt32(value);
break;
case "XPTCK":
XPTCK = (string)value;
break;
case "MTUSER":
MTUSER = (string)value;
break;
case "SELECTNUM":
SELECTNUM = Convert.ToInt32(value);
break;
case "SELECT":
SELECT = (string)value;
break;
case "CONTINUE":
CONTINUE = (string)value;
break;
case "MDATE":
MDATE = (string)value;
break;
case "MPUDATE":
MPUDATE = (string)value;
break;
case "MPAYDATE":
MPAYDATE = (string)value;
break;
case "MGONEDATE":
MGONEDATE = (string)value;
break;
case "MSHPNAME":
MSHPNAME = (string)value;
break;
case "MSHPCNME":
MSHPCNME = (string)value;
break;
case "MSHPAD1":
MSHPAD1 = (string)value;
break;
case "MSHPAD2":
MSHPAD2 = (string)value;
break;
case "MSHPCITY":
MSHPCITY = (string)value;
break;
case "MEMAIL":
MEMAIL = (string)value;
break;
case "MPHOTO":
MPHOTO = (string)value;
break;
case "MSHPST":
MSHPST = (string)value;
break;
case "MSTATE":
MSTATE = (string)value;
break;
case "MGONEPER":
MGONEPER = (string)value;
break;
case "MSHPZIP":
MSHPZIP = (string)value;
break;
case "MZIP":
MZIP = (string)value;
break;
case "MSHIPVIA":
MSHIPVIA = (string)value;
break;
case "MPUTIME":
MPUTIME = (string)value;
break;
case "MGONETIME":
MGONETIME = (string)value;
break;
case "MCASH":
MCASH = (string)value;
break;
case "MLETTER":
MLETTER = (string)value;
break;
case "MYTAX":
MYTAX = (string)value;
break;
case "MLABEL":
MLABEL = (string)value;
break;
case "MNUMBER":
MNUMBER = (string)value;
break;
case "MINVNO":
MINVNO = (string)value;
break;
case "MCUSTPO":
MCUSTPO = (string)value;
break;
case "MSHIPFROM":
MSHIPFROM = (string)value;
break;
case "MCONTACT":
MCONTACT = (string)value;
break;
case "MPHONE":
MPHONE = (string)value;
break;
case "MFAX":
MFAX = (string)value;
break;
case "MCELL":
MCELL = (string)value;
break;
case "MCOMMENT":
MCOMMENT = (string)value;
break;
case "MCOMMENT1":
MCOMMENT1 = (string)value;
break;
case "MACCTN":
MACCTN = (string)value;
break;
case "MSTREET":
MSTREET = (string)value;
break;
case "MCITY":
MCITY = (string)value;
break;
case "MCHECKNO":
MCHECKNO = (string)value;
break;
case "MENGRAV":
MENGRAV = Convert.ToInt32(value);
break;
case "MTAX":
MTAX = Convert.ToInt32(value);
break;
case "MSHIPPING":
MSHIPPING = Convert.ToInt32(value);
break;
case "MTOTAL":
MTOTAL = Convert.ToInt32(value);
break;
case "MPAYMENT":
break;
case "MCC":
MCC = (string)value;
break;
case "XSALESPER":
XSALESPER = (string)value;
break;
case "MSNAME":
MSNAME = (string)value;
break;
case "MEVENTDTE":
MEVENTDTE = (string)value;
break;
case "MOPENACCT":
MOPENACCT = (string)value;
break;
case "MPAYPERSON":
MPAYPERSON = (string)value;
break;
case "ANS":
ANS = (string)value;
break;
case "MFILENAME":
MFILENAME = (string)value;
break;
}
}
}
}
到
Content content = new Content("text/plain", notification.getContent());