如何使用web.mail命名空间发送邮件 [英] how to send mail using web.mail name space
本文介绍了如何使用web.mail命名空间发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi朋友
我尝试使用此代码,但无法收到邮件
请通过此向我发送您宝贵的想法
hi Friends
i try this code but not able to get mail
please through this send me u r valuable thoughts
MailMessage mailMessage=new MailMessage();
mailMessage.From = "vsiddi@xxx.com";
mailMessage.To="vsiddi@ajel.com";
mailMessage.Cc = "vsiddi@xxx.com";
mailMessage.Bcc = "vsiddi@xxx.com";
mailMessage.Subject = "this test mail";
mailMessage.BodyFormat = MailFormat.Text;
mailMessage.Body = "sample mail";
mailMessage.Priority = MailPriority.Normal;
SmtpMail.SmtpServer = "mail.ajel.com";
SmtpMail.Send(mailMessage);
lblValidate.Visible = true;
lblValidate.Text = "successfully subscribed.";
问候
Venklat.S
Regards
Venklat.S
推荐答案
此处有一种通用的发送方法: ^ ]
There is a generic methods for send them here: Sending an Email in C# with or without attachments: generic routine.[^]
这篇关于如何使用web.mail命名空间发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文