Пример #1
0
        public void sendEmailToO2Support(string subject, string text, bool sendSync)
        {
            sendMessageToolStripMenuItem1.Text = "Sending email....";
            try
            {
                var screenShotToSend = new PictureBox
                {
                    BackgroundImage =
                        Screenshots.getScreenshotOfFormObjectAndItsControls(this)
                };
                DI.log.debug("Sending email to O2 Support with: " + text);
                Mail.sendMail(PublicDI.sEmailHost, "*****@*****.**",
                              PublicDI.sEmailToSendBugReportsTo, "",
                              "Email from O2 User - " + subject,
                              Mail.getUserDetailsAsEmailFormat() + Environment.NewLine + text,
                              DebugMsg.createAttachmentsForRemoteSupport(DebugMsg.getFirstRtbObject(), screenShotToSend),
                              sendSync, emailMessageSent);

                //
            }
            catch (Exception ex)
            {
                DI.log.ex(ex, "in sendEmailToO2Support");
                DI.log.error(
                    "Could not send support email, please ensure that this o2 module is connected to the Internet");
            }
        }
Пример #2
0
        private void btSendMessage_Click(object sender, EventArgs e)
        {
            btSendMessage.Enabled = false;
            lbMailServerConnectErrorMessage.Visible = false;
            //var oAttachments = new List<object> {rtbLogViewContentsToSend.Rtf};
            //oAttachments.Add(Bitmap. pbScreenShotToSend.I


            List <String> lsAttachements = DebugMsg.createAttachmentsForRemoteSupport(rtbLogViewContentsToSend, pbScreenShotToSend);

            //Mail.createAttachmentsForRemoteSupport(rtbLogViewContentsToSend, pbScreenShotToSend, sFile_LogViews, sFile_LogViewsTxt, sFile_ScreenShot);

            Mail.sendMail(tbMailServer.Text, tBoxFromEmail.Text, tBoxToEmail.Text, "", tbSubject.Text,
                          tbMessage.Text, lsAttachements, true, emailSentCallback);
        }