Link to home
Create AccountLog in
Avatar of Webboy2008
Webboy2008

asked on

asp.net c# asp.net Send Email

The following code shown invalid error...

The "SendUsing" configuration value is invalid.

I have no idea why. This is my development box with Window 2003 and IIS 6.0 Thanks

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Mail;

public partial class UI_SignUpControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MailMessage msg = new MailMessage();
        msg.To = "rickyyuhello@yahoo.com";
        msg.From = "rickyyuhello@yahoo.com";
        msg.Subject = "Test";
        msg.Body = "Test";
        Response.Write("Sent..");
        SmtpMail.Send(msg);
    }
    protected void btnsignup_Click(object sender, EventArgs e)
    {
         
    }
}
Avatar of Kumaraswamy R
Kumaraswamy R
Flag of India image

ASKER CERTIFIED SOLUTION
Avatar of raja_ind82
raja_ind82
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account