.net新手 错误No overload for method 'AddRecipient' takes '1' arguments
出现这个错误No overload for method 'AddRecipient' takes '1' arguments
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default2 : System.Web.UI.Page
{
protected void btn_Submit(object sender, EventArgs e)
{
//我这里测试的邮件账号是codeany@163.com
//测试的密码是就不投入给大家了,改成自己的密码就好了
//接受邮箱可以随便写一个你自己喜欢的邮箱
jmail.Message Jmail = new jmail.Message(); //创建一个jmail对象
String Subject = this.State.Value; //设置发送邮件的主题
String body = this.Name.Value + this.Email.Value + this.Contect.Value; //设置发送邮件的内容
String FromEmail = "bandai008@126.com"; //发送的邮箱
String ToEmail = "bandai008@qq.com"; //接受的邮箱
Jmail.Silent = true; //安静的发送邮件
Jmail.Charset = "UTF-8"; //设置发送邮件的字符集
Jmail.ContentType = "text/html";
Jmail.AddRecipient(ToEmail); //添加发送的邮件
Jmail.From = FromEmail; //从何处发送
Jmail.MailServerUserName = "***********"; //发件人姓名
Jmail.MailServerPassWord = "***********"; //发件邮件的密码
Jmail.Subject = Subject; //发件邮件的主题
&nbs