SMTP中的CC无法正常工作 [英] CC in SMTP not working

查看:369
本文介绍了SMTP中的CC无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好



我在通过SMTP发送CC邮件时遇到了一些麻烦。网站管理员从在线表单中获取他的邮件,在他的邮件中我可以看到谁应该被复制的电子邮件地址,但该人本人实际上并没有收到

网站管理员的消息的副本。



我尝试了各种各样的结合:



Hello

I am having some trouble with sending CC mail via SMTP. The Webmaster gets his mail from an online form and in his message I can see the email address of who is supposed to be copied in, but the person himself does not actually receive a copy of the
Webmaster's message.

I have tried various conjugations of this:

myMessage.CC.Add(New MailAddress("admin@mysite.com")) 'Webmaster's assistant





但它们不起作用。



Visual Studio中没有错误或我的Web托管服务出现服务器错误。



谢谢任何建议。



我尝试过:



我是尝试使用这样的东西:





but they don't work.

There are no errors either in Visual Studio or server errors from my Web hosting service.

Thanks for any advice.

What I have tried:

I was trying to use something like this:

Dim CC As MailAddress = New MailAddress()

但是我得到了新邮件地址的过载错误以蓝色下划线标出。

but I get an 'overload' error with New MailAddress underlined in blue.

推荐答案

根据文档中的示例( MailMessage.CC属性(System.Net.Mail) [ ^ ])你正在做的事情看似正确。您应该尝试获取成功传递的消息的副本,并检查原始内容以查看是否有任何更改。另外,如果可能的话,获取服务器日志。



另一个错误的原因是 MailAddress 类没有有一个不带参数的构造函数。文档将始终澄清这些问题。
According to the example in the documentation (MailMessage.CC Property (System.Net.Mail)[^]) what you are doing appears correct. You should try and get a copy of a successfully delivered message, and check the raw content to see if anything has been changed. Also if possible get the server logs.

The reason for the other error is that the MailAddress class does not have a constructor that takes no parameters. The documentation will always clarify such questions.


谢谢Richard,您的回复。



关于您的段落:原因另一个错误是MailAddress类没有不带参数的构造函数。



你的意思是我应该做类似

的事情

Thanks, Richard for your reply.

Regarding your paragraph here: The reason for the other error is that the MailAddress class does not have a constructor that takes no parameters.

Do you mean I should do something like

Dim CC As MailAddress = New MailAddress("me@myemail.com")





再次感谢!



Thanks again!


这篇关于SMTP中的CC无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆