예제 #1
0
 public void initMailList()
 {
     deleAllMail();
     Content.GetComponent <RectTransform> ().sizeDelta = new Vector2(0, posY * account.mailList.Count);
     if (account.mailList.Count == 0)
     {
         root.Find("NoMail").gameObject.SetActive(true);
         return;
     }
     for (int i = 0; i < account.mailList.Count; i++)
     {
         MAIL      mail = account.mailList [i];
         Transform tr   = Instantiate(mailBase);
         string    info = "";
         if (mail.mailType == 1)
         {
             info = mail.senderName + " 发了一封邮件给你,请尽快查收吧";
         }
         else if (mail.mailType == 3)
         {
             info = mail.senderName + " 想要添加你为好友,请尽快处理吧";
         }
         else if (mail.mailType == 2)
         {
             info = mail.senderName + "同意了你的加好友请求";
         }
         tr.Find("info").GetComponent <Text> ().text  = info;
         tr.Find("look").GetComponent <Text> ().text  = (mail.lookOver == 0 ? "未读" : "已读");
         tr.Find("index").GetComponent <Text> ().text = i + "";
         tr.SetParent(Content, false);
         tr.gameObject.SetActive(true);
         EventInterface.AddOnEvent(tr, ClickMail);
     }
 }
예제 #2
0
    void showMailInfoPanel(MAIL mail)
    {
        GameObject go = GameManager.GetInstance().LoadPanel("Prefabs/mailInfoPanel");

        go.GetComponent <mailInfoPanel>().showMailInfoPanel(mail);
        root.DOScale(Vector3.zero, 0.5f).SetEase(Ease.InBack).OnKill(() => {
            DestroyObject(gameObject);
        });
    }
예제 #3
0
        private void yahoo()
        {
            MAIL yahooMail = metodos_MAIL.seleccionarYahoo();

            txtEmail.Text = txtEmail.Text.Replace(',', ';');
            List <string> destinatarios = new List <string>();

            destinatarios = txtEmail.Text.Split(';').ToList();

            string[] datos     = pdf.Split('_');
            string   remoteUri = "";

            if (esMiPago == true)
            {
                remoteUri = "http://eostechnology.com.mx/EOSFACT/pagofiscal.php?idventa=" + datos[2];
            }
            else
            {
                remoteUri = "http://eostechnology.com.mx/factura/facturafiscal.php?idventa=" + datos[2];
            }

            string smtpAddress = "smtp.mail.yahoo.com";
            int    portNumber  = 587;
            bool   enableSSL   = true;

            string emailFrom = "*****@*****.**";
            string password  = "******";
            //string emailTo = "*****@*****.**";
            string subject = "Envio de Factura";
            string body    = "Este email fue enviado de manera automática, por favor no responda a este. <br>Para consultar su factura haga clic <a href='" + remoteUri + "'>aquí</a> ";

            using (MailMessage mail = new MailMessage())
            {
                mail.From = new MailAddress(yahooMail.email.Trim());
                foreach (string item in destinatarios)
                {
                    mail.To.Add(new MailAddress(item));
                }
                mail.Subject    = subject;
                mail.Body       = body;
                mail.IsBodyHtml = true;
                // Can set to false, if you are sending pure text.
                Attachment data2 = new Attachment(file, MediaTypeNames.Application.Octet);
                mail.Attachments.Add(data2);
                //mail.Attachments.Add(new Attachment("C:\\SomeZip.zip"));

                using (SmtpClient smtp = new SmtpClient(smtpAddress, portNumber))
                {
                    smtp.UseDefaultCredentials = false;
                    smtp.Credentials           = new NetworkCredential(yahooMail.email.Trim(), yahooMail.pasw.Trim());
                    smtp.EnableSsl             = enableSSL;
                    smtp.Send(mail);
                }
            }
        }
예제 #4
0
        private void gmail()
        {
            MAIL gmailMail = metodos_MAIL.seleccionarGMAIL();

            txtEmail.Text = txtEmail.Text.Replace(',', ';');
            List <string> destinatarios = new List <string>();

            destinatarios = txtEmail.Text.Split(';').ToList();

            string[] datos     = pdf.Split('_');
            string   remoteUri = "";

            if (esMiPago == true)
            {
                remoteUri = "http://eostechnology.com.mx/EOSFACT/pagofiscal.php?idventa=" + datos[2];
            }
            else
            {
                remoteUri = "http://eostechnology.com.mx/factura/facturafiscal.php?idventa=" + datos[2];
            }


            Attachment  data2 = new Attachment(file, MediaTypeNames.Application.Octet);
            MailMessage mail  = new MailMessage()
            {
                From       = new MailAddress(gmailMail.email),
                Body       = "Este email fue enviado de manera automática, por favor no responda a este. <br>Para consultar su factura haga clic <a href='" + remoteUri + "'>aquí</a> ",
                Subject    = "Envio de Factura",
                IsBodyHtml = true
            };

            mail.Attachments.Add(data2);
            foreach (string item in destinatarios)
            {
                mail.To.Add(new MailAddress(item));
            }

            SmtpClient smtp = new SmtpClient()
            {
                Host = "smtp.gmail.com",
                Port = 587,
                UseDefaultCredentials = false,
                Credentials           = new NetworkCredential(gmailMail.email.Trim(), gmailMail.pasw.Trim()),
                EnableSsl             = true
            };

            smtp.Send(mail);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
예제 #5
0
    void ClickMail(Transform tr)
    {
        tr.Find("look").GetComponent <Text>().text = "已读";
        int  index = int.Parse(tr.Find("index").GetComponent <Text>().text);
        MAIL mail  = account.mailList[index];

        if (mail.lookOver == 0)
        {
            account.baseEntityCall.reqLookMail(mail.mailID);
        }

        account.mailList[index].lookOver = 1;
        hallPanel.instance.showMailInfo(account);
        showMailInfoPanel(mail);
    }
예제 #6
0
    public void showMailInfoPanel(MAIL _mail)
    {
        mail = _mail;
        switch (mail.mailType)
        {
        case 0:
            showGiveGoldMail();

            break;

        case 1:
            showNormalMail();

            break;

        case 3:
            showAddFriendMail();
            break;

        case 2:
            showAddFriendSuccessMail();
            break;
        }
    }