发送的SmtpClient电子邮件 [英] SmtpClient Email sent from

查看:203
本文介绍了发送的SmtpClient电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用使用ASP发送带有smtp身份验证的电子邮件中的代码.NET 3.5 [ ^ ],我通过我们公司的SMTP服务测试了电子邮件递送。它一般工作。但是有一个缺陷。我通过SMTP电子邮件服务器中的电子邮件帐户发送电子邮件。发送电子邮件后,我的SMTP邮箱已发送邮件没有我发送的电子邮件。我确实输入了我的电子邮件地址,如下所示:

e_mail.From = new MailAddress(txtFrom.Text);

任何提示?谢谢。

Using the code at Send email with smtp authentication using ASP.NET 3.5[^], I tested email delivery through our company's SMTP service. It works in general. But there is one defect. I send the email though my email account in the SMTP email server. After I send an email, my SMTP mailbox Sent Items does not have the email I sent. I did enter my email address, like that below:
e_mail.From = new MailAddress(txtFrom.Text);
Any hint? Thanks.

推荐答案

在From和NetworkCredentials中使用相同的ID。也可以使用与From属性相同的Sender属性。



我已经尝试使用gmail帐户并且它可以正常工作。
Use the same id in From and NetworkCredentials. Also use Sender property same as From property.

I have tried it using gmail account and it works.


这篇关于发送的SmtpClient电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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