用asp.net发送邮件时,假设我用[email protected]这个邮箱发送.但我想让收件人收件栏看到的另一个邮箱地址.而不是[email protected]这个邮箱地址,如何实现了?

解决方案 »

  1.   

    MailMessage mail = new MailMessage();
    mail.From = new MailAddress("[email protected]", "河蟹");
      

  2.   

                MailMessage message = new MailMessage("发送email", "接收emil", "标题", "内容");
                message.IsBodyHtml = true;
                SmtpClient smtpClient = new SmtpClient();
                smtpClient.Host = "Smtp服务器";
                smtpClient.Credentials = new NetworkCredential("用户名","密码");
                smtpClient.Send(message);
    关键是找个能用的smtp服务器,用户名和密码..
      

  3.   

    ...如果是通过别人的SMTP服务器的话,是不可能办到的,必须要通过SMTP验证才能发送邮件。。
      

  4.   


    我明白.我上面发的那个方法.发送email,跟smtp服务器,用户名,密码不相关.
      

  5.   

    MailMessage message = new MailMessage("[email protected]", "[email protected]", "标题", "内容");
                message.IsBodyHtml = true;
                SmtpClient smtpClient = new SmtpClient();
                smtpClient.Host = "Smtp.163.com";
                smtpClient.Credentials = new NetworkCredential("用户名","密码");
                smtpClient.Send(message);
    如上面这段代码.我以[email protected]邮箱发向[email protected]这个邮箱发邮件[email protected]这个邮箱看到的发件人肯定是[email protected]这个人.对吧?这想实现的功能是我想让[email protected]看到的发件人不是[email protected],而是其它邮件.这个邮件可以由我来定义.请问要怎样实现的了?
      

  6.   

    MailMessage mail = new MailMessage(); 
    mail.From = new MailAddress("[email protected]", "河蟹");
    楼上用new MailAddress("[email protected]", "河蟹");,那收件人看到的地址也是[email protected]了.我是要让收件人看到的[email protected]不是这个.而是另外的.怎样实现了?
      

  7.   

    MailMessage message = new MailMessage("[email protected]", "[email protected]", "标题", "内容"); 
                message.IsBodyHtml = true; 
                SmtpClient smtpClient = new SmtpClient(); 
                smtpClient.Host = "Smtp.163.com"; 
                smtpClient.Credentials = new NetworkCredential("[email protected]","密码"); 
                smtpClient.Send(message);