/// <summary> /// 写邮件. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_WriteMail_Click(object sender, EventArgs e) { DDogClientSendMailRequest req = new DDogClientSendMailRequest(); //临时用,发给自己. req.c2s_receiver_uuid = this.client.LastRoleData.uuid; req.c2s_title = "邮件测试"; req.c2s_content = new DDogMailContentData { txt_content = "暗地里发了快递费骄傲了看对方进度发", attachment_list = null }; this.client.GameClient.Request <DDogClientSendMailResponse>(req, (err, rsp) => { if (Response.CheckSuccess(rsp)) { MessageBox.Show("邮件发送成功 : " + rsp); } else if (err != null) { MessageBox.Show("邮件发送失败 : " + err.Message); } }); }
private void btn_send_Click(object sender, EventArgs e) { DDogClientSendMailRequest req = new DDogClientSendMailRequest(); DDogMailContentData content = new DDogMailContentData(); content.txt_content = textBox_mailContent.Text; //req.c2s_receiver_uuid = combobox_receiver.Text; req.c2s_receiver_uuid = ""; req.c2s_title = textbox_mailTitle.Text; req.c2s_content = content; this.client.GameClient.Request <DDogClientSendMailResponse>(req, (err, rsp) => { if (rsp.IsSuccess) { MessageBox.Show("邮件发送成功 : " + rsp); } else { MessageBox.Show("邮件发送失败 : " + rsp.s2c_code); } }); }