Ejemplo n.º 1
0
    protected void btnsend_Click(object sender, EventArgs e)
    {
        string to, sub, body;

        to   = txtTo.Text;
        sub  = txtSubject.Text;
        body = txtMessage.Text;
        MailSender send = new MailSender();
        bool       res  = send.GmailSender(to, sub, body);

        if (res)
        {
            lblmailmsg.Text = "Mail sent";
        }
        else
        {
            lblmailmsg.Text = "Mail not send";
        }
    }
    protected void btnsend_Click(object sender, EventArgs e)
    {
        string to, sub, body;

        to   = emailid;
        sub  = "Enquriy Reply From GeekNotes";
        body = txtMail.Text;
        MailSender send = new MailSender();
        bool       res  = send.GmailSender(to, sub, body);

        if (res)
        {
            lblmailmsg.Text = "Mail sent";
        }
        else
        {
            lblmailmsg.Text = "Mail not sent";
        }
    }