0
如何在MailChimp中製作按鈕「確認訂閱」?如何爲gmail製作「確認訂閱」按鈕?
我的HTML代碼至今:
<div itemscope itemtype="http://schema.org/EmailMessage">
<meta itemprop="description" content="Confirmacao de inscricao" />
<div itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction">
<meta itemprop="name" content="Confirmar Agora" />
<div itemprop="handler"
itemscope itemtype="http://schema.org/HttpActionHandler">
<link itemprop="url"
href="http://beta.pegacupom.com.br/confirmnews.aspx?code=xyz" />
</div>
</div>
</div>
上面的代碼是在 'https://developers.google.com/gmail/schemas/testing-your-schema' 測試,工作正常。
但是當我把這段代碼放到我的c#網站時,電子郵件不會發送。
可以用SPF
或DKIM
?
這是我的代碼發送郵件在C#:
System.Net.Mail.MailMessage objMail = new System.Net.Mail.MailMessage();
objMail.From = new MailAddress("[email protected]", "myName");
objMail.To.Add(new MailAddress(emailTO));
objMail.Headers.Add("Content-Type", "text/html");
objMail.Body = mensagem;
objMail.IsBodyHtml = true;
objMail.SubjectEncoding = Encoding.GetEncoding("ISO-8859-1");
objMail.BodyEncoding = Encoding.GetEncoding("ISO-8859-1");
objMail.Subject = assunto;
SmtpClient objSMTP = new SmtpClient("smtp.myDOMAIN.com.br", 587);
System.Net.NetworkCredential objCredential = new System.Net.NetworkCredential("[email protected]", "myPASS");
objSMTP.Credentials = objCredential;
objSMTP.Send(objMail);
爲什麼郵件無法發送?