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

问题描述

你好,


我写了这封代码用于发送邮件但是没有用。

告诉我在等号后应该写什么

SmtpMail.SmtpServer =;


所以邮件存储在/ Inetpub / mailroot / queue&另外我如何通过此代码发送外部邮件。


MailMessage msgmail = new MailMessage();

msgmail.From = txtFrom.Text ;

msgmail.To = txtTo.Text;

msgmail.Subject = txtSubject.Text;

msgmail.Body = txtMessage.Text;

//SmtpMail.SmtpServer =" IP地址"

SmtpMail.SmtpServer =;

//发送消息

SmtpMail.Send(msgmail);

//清除TO,主题,消息字段

txtTo.Text ="" ;;

txtSubject.Text ="";

txtMessage.Text ="" ;;

//显示状态

litStatus.Text = "< p>已发送消息。< / p>" ;;


请尽快回复...........

Hello,

I have written this code for sending mails but is not working.
Tell what should I have to write after the equal sign in
SmtpMail.SmtpServer = ;

so mail to be stored in /Inetpub/mailroot/queue & also how can I send External mails throu this code.


MailMessage msgmail= new MailMessage();
msgmail.From = txtFrom.Text;
msgmail.To = txtTo.Text;
msgmail.Subject = txtSubject.Text;
msgmail.Body =txtMessage.Text;
//SmtpMail.SmtpServer = "IP Address"
SmtpMail.SmtpServer =;
//send message
SmtpMail.Send(msgmail);
//clear TO,Subject,message fields
txtTo.Text="";
txtSubject.Text="";
txtMessage.Text="";
//show status
litStatus.Text ="<p>Message sent.</p>";

Pls reply ASAP...........

推荐答案




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

09-02 00:46