问题描述
我正在使用Godaddy邮件服务器通过 asp.net代码发送电子邮件.邮件已成功发送,但未存储在已发送邮件文件夹中.我正在使用以下代码:
I'm sending email through asp.net code using godaddy mail server. Mail is sent successfully but not stored in sent item folder. I am using below code :
SmtpClient client = new SmtpClient();
client.Host = "smtpout.secureserver.net";
client.Port = 25;
client.UseDefaultCredentials = false;
client.Credentials = new System.Net.NetworkCredential("[email protected]", "XXXXXXX");
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.EnableSsl = false;
client.Send(message);
message = null; // free up resources
// client.Send(message);
msg = "Successful";
推荐答案
这就是SMTP的工作方式.这纯粹是一种协议,用于通过原始客户端或临时服务器在另一台上游服务器上将邮件投递到邮件服务器上的邮件.SMTP服务器是链式工作的;您的客户端在Godaddy停运,今天可能在上游服务器停运,上游服务器在目标站点(或另一个上游;在途中很多服务器可能会处理).
That's how SMTP works. It's purely a protocol for dropping a mail off at a mail server, either by your originating client or an interim server dropping it off at another upstream server. SMTP servers work in chains; your client drops off at godaddy, today's might drop off at an upstream server, upstream server drops off at destination (or another upstream; many servers might handle it on the way).
如果SMTP将邮件存储在已发送的邮件文件夹中,则传递链中涉及的每台服务器都将拥有它曾经传输的每封邮件的副本-硬盘将在数分钟内装满!
If SMTP stored mails in a sent mail folder, every server involved in the delivery chain would have a copy of every mail it ever transited - hard disks would be full in minutes!
存储在已发送邮件"文件夹中通常是IMAP等其他服务的功能.像Outlook这样的重量级邮件客户端使用SMTP发送邮件后,它将存储使用IMAP连接(相同的邮件服务器,可能完全不同的协议)发送的邮件的副本.如果您想要相同的功能,则还必须在程序中构建一个IMAP客户端
Storing in a Sent Items folder is typically a function of a different service like IMAP. After a heavyweight mail client like Outlook sends a mail using SMTP it stores a copy of what was sent using an IMAP connection (same mail server, probably- totally different protocol). If you want the same functionality you have to build an IMAP client into your program too
如果这不容易理解,那就是真实世界的比喻:
If this isn't easy to understand, a real world analogy:
您打开Word,写一封信,打印它,张贴它(= SMTP),然后关闭计算机.该文档不在我的文档"文件夹(=已发送邮件"文件夹)中.如果需要,则必须单击在Word中保存",然后保存到我的文档"文件夹(=已发送邮件中的IMAP存储"文件夹)
You open Word, write a letter, print it, post it (=SMTP), and turn your computer off. The document is not in My Documents folder (=sent items folder). If you want it there they you have to click Save in Word, save into your My Documents folder (=IMAP storage in sent items folder)
这篇关于通过编程,Godaddy已发送电子邮件不在“已发送邮件"文件夹C#.net中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!