如何在asp.net中发送没有密码的电子邮件c# [英] How to send email without password in asp.net c#
本文介绍了如何在asp.net中发送没有密码的电子邮件c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在不输入密码的情况下发送电子邮件
如何向每个人发送电子邮件没有限制电子邮件密码
解决方案
Hi
您配置的所有电子邮件
您可以发送邮件
检查前景的代码
/////////////////////////////// ////////////////////////////////////////
微软。 Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem email =(Microsoft.Office.Interop.Outlook。 MailItem)(oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem));
email.Recipients.Add(txtEmail.Text.Trim());
email.Attachments.Add((object)@D:\\CreditInvoice.pdf,Microsoft.Office.Interop.Outlook.OlAttachm entType.olEmbeddeditem,1,(object)Attachment);
email.Subject =CreditInvoice;
email.Body =Find Enclosed Attachment File;
((Microsoft.Office.Interop.Outlook.MailItem)电子邮件)。发送();
//////////////// ////////////////////////////////////////////////// /////////////
i want to send email without entering Password
How to send email to every one Without restriction email Password
解决方案
Hi
any email you configure with outlook
from that you can send the mail
check the fallowing code for outlook
///////////////////////////////////////////////////////////////////////
Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
Microsoft.Office.Interop.Outlook.MailItem email = (Microsoft.Office.Interop.Outlook.MailItem)(oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem));
email.Recipients.Add(txtEmail.Text.Trim());
email.Attachments.Add((object)@"D:\\CreditInvoice.pdf", Microsoft.Office.Interop.Outlook.OlAttachmentType.olEmbeddeditem, 1, (object)"Attachment");
email.Subject = "CreditInvoice";
email.Body = "Find Enclosed Attachment File";
((Microsoft.Office.Interop.Outlook.MailItem)email).Send();
///////////////////////////////////////////////////////////////////////////////
这篇关于如何在asp.net中发送没有密码的电子邮件c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文