コード例 #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     GmailClient client = new GmailClient();
     //Jesli chcemy wyslac email bez załącznika to musimy wstawić null w parametr zalącznika
     string status = client.send(txt_gmailid.Text, txt_password.Text, txt_toemail.Text, txt_subject.Text, txt_body.Text, txt_attachment.Text == "" ? null : txt_attachment.Text);
     MessageBox.Show(status);
 }
コード例 #2
0
 private void btnOrderNow_Click(object sender, EventArgs e)
 {
     if (txtToEmail.Text == "")
     {
         alert.Show("Please input Gmail.", alert.AlertType.warning);
     }
     else if (lblEmailValidation.Text != "")
     {
         alert.Show("Incorrect email type.", alert.AlertType.warning);
     }
     else
     {
         GmailClient client   = new GmailClient();
         string      gmail    = "*****@*****.**";
         string      password = "******";
         string      status   = client.send(gmail, password, txtToEmail.Text, txtSubject.Text, txtBody.Text, txtAttachment.Text == "" ? null : txtAttachment.Text);
         string      message  = status;
         if (message == "Invalid emailid or password or internet connection is not available")
         {
             alert.Show("Invalid emailid or password or internet connection is not available.", alert.AlertType.warning);
         }
         else
         {
             alert.Show("Successfully Sent", alert.AlertType.success);
             this.Hide();
         }
     }
 }
コード例 #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     GmailClient client = new GmailClient();
    
     string status = client.send(txt_gmailid.Text, txt_password.Text, txt_toemail.Text, txt_subject.Text,bodytbox.Text, txt_attachment.Text == "" ? null : txt_attachment.Text);
     MessageBox.Show(status);
 }
コード例 #4
0
        private void button2_Click(object sender, EventArgs e)
        {
            GmailClient client = new GmailClient();

            string status = client.send(txt_gmailid.Text, txt_password.Text, txt_toemail.Text, txt_subject.Text, bodytbox.Text, txt_attachment.Text == "" ? null : txt_attachment.Text);

            MessageBox.Show(status);
        }
コード例 #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            GmailClient client = new GmailClient();
            //If you want to send email without attachment, then pass null value in attachment parameter.
            string status = client.send(txt_gmailid.Text, txt_password.Text, txt_toemail.Text, txt_subject.Text, txt_body.Text, txt_attachment.Text == ""?null:txt_attachment.Text);

            MessageBox.Show(status);
        }
コード例 #6
0
        private void button2_Click(object sender, EventArgs e)
        {
            progressBar1.Value = 10;
            GmailClient client = new GmailClient();

            progressBar1.Value = 50;
            string status = client.send(Properties.Settings.Default.guser, Properties.Settings.Default.gpassword, txt_toemail.Text, txt_subject.Text, bodytbox.Text, txt_attachment.Text == "" ? null : txt_attachment.Text);

            progressBar1.Value = 100;
            MessageBox.Show(status);
        }
コード例 #7
0
        private void button2_Click(object sender, EventArgs e)
        {

            progressBar1.Value = 10;
            GmailClient client = new GmailClient();
            progressBar1.Value = 50;
            string status = client.send(Properties.Settings.Default.guser, Properties.Settings.Default.gpassword, txt_toemail.Text, txt_subject.Text, bodytbox.Text, txt_attachment.Text == "" ? null : txt_attachment.Text);
            progressBar1.Value = 100;
            MessageBox.Show(status);
        }