Ejemplo n.º 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string resc       = TextBox1.Text.Trim();
        string subject    = "Re: " + TextBox2.Text.Trim();
        string message    = TextBox3.Text.Trim();
        string attachment = "No File";

        if (FileUpload1.HasFile)
        {
            FileUpload1.SaveAs(Server.MapPath("attachment/" + FileUpload1.FileName));
            attachment = FileUpload1.FileName;
        }
        c.Compose(Session[Constants.Session.ID].ToString(), resc, subject, message, attachment);
        // Label1.Text = "Mail Sent..!!!!!";
        Session["message"] = "1";
        Response.Redirect("inbox.aspx");
    }