Example #1
0
    //请求发送邮件..
    public static bool Send_CS_SEND_MAIL_REQ(HeaderProto.SEND_MAIL sendMail)
    {
        CliProto.CS_SEND_MAIL_REQ refMSG = new CliProto.CS_SEND_MAIL_REQ();
        refMSG.m_MailInfo = sendMail;

        SDNetGlobal.SendMessage(refMSG);
        return(true);
    }
Example #2
0
    public void OnSendMail()
    {
        HeaderProto.SEND_MAIL sendMail = new HeaderProto.SEND_MAIL();

        if (sendTo)
        {
            string strSendTo = sendTo.GetComponent <UIInput>().value;
            sendMail.m_Receiver = System.Text.Encoding.UTF8.GetBytes(strSendTo);
        }

        if (sendTitle)
        {
            string strSendTitle = sendTitle.GetComponent <UIInput>().value;
            sendMail.m_Title = System.Text.Encoding.UTF8.GetBytes(strSendTitle);
        }

        if (sendTxt)
        {
            string strSendTxt = sendTxt.GetComponent <UIInput>().value;
            sendMail.m_Content = System.Text.Encoding.UTF8.GetBytes(strSendTxt);
        }

        if (sendMoney)
        {
            string strSendMoney = sendMoney.GetComponent <UIInput>().value;
            sendMail.m_Money = int.Parse(strSendMoney);
        }

        if (sendItem)
        {
            string strSendItem = sendItem.GetComponent <UIInput>().value;
            int    iItemID     = int.Parse(strSendItem);
            if (iItemID > 0)
            {
                UInt64 uuID = sdGameItemMgr.Instance.getItemUIDByTID(iItemID);
                if (uuID != UInt64.MaxValue)
                {
                    sendMail.m_ItemCount = 1;
                    sendMail.m_Items[0]  = uuID;
                }
            }
        }

        sdMailMsg.Send_CS_SEND_MAIL_REQ(sendMail);
    }