Esempio n. 1
0
        protected void Init()
        {
            subject = "Test Subject. International chars: ËÇÅÃÄÄÅÂÀèéêëìíîïñaÿc + 功能超强得不得了";
            body    = "Hello Jane.\r\n This is the body of the mail message. \r\nInternational chars: ËÇÅÃÄÄÅÂÀèéêë\r\nìíîïñaÿc";

            htmlBody = new StringBuilder();
            htmlBody.Append("<HTML><HEAD></HEAD><BODY bgColor=\"#00ffff\"><b>Hello Jane. This is the body of the HTML mail message. International chars: ËÇÅÃÄÄÅÂÀèéêëìíîïñaÿc</b></BODY></HTML>");

            senderAddress    = new EmailAddress("sender@localhost", "John Sender");
            recipientAddress = new EmailAddress("administrator@localhost", "Jane Doe");

            replyToAddress = new EmailAddress("replyTo@localhost", "ReplyTo Name");
            ccAddress      = new EmailAddress("ccAddress@localhost", "CC Name");
            bccAddress     = new EmailAddress("bccAddress@localhost", "BCC Name");

            msg = new MailMessage("*****@*****.**", "*****@*****.**");

            smtpHost = "localhost";
            smtpPort = 25;

            smtp      = new Smtp();
            smtp.Host = smtpHost;
            smtp.Port = smtpPort;

            // Add Smtp event listener
            SmtpEventListener listener = new SmtpEventListener(smtp);
        }
Esempio n. 2
0
        protected void Init()
        {
            subject 		= "Test Subject. International chars: ËÇÅÃÄÄÅÂÀèéêëìíîïñaÿc + 功能超强得不得了";
                body 			= "Hello Jane.\r\n This is the body of the mail message. \r\nInternational chars: ËÇÅÃÄÄÅÂÀèéêë\r\nìíîïñaÿc";

                htmlBody = new StringBuilder();
                htmlBody.Append("<HTML><HEAD></HEAD><BODY bgColor=\"#00ffff\"><b>Hello Jane. This is the body of the HTML mail message. International chars: ËÇÅÃÄÄÅÂÀèéêëìíîïñaÿc</b></BODY></HTML>");

                senderAddress 		= new EmailAddress("sender@localhost", "John Sender");
                recipientAddress 	= new EmailAddress("administrator@localhost", "Jane Doe");

                replyToAddress 		= new EmailAddress("replyTo@localhost", "ReplyTo Name");
                ccAddress 		= new EmailAddress("ccAddress@localhost", "CC Name");
                bccAddress		= new EmailAddress("bccAddress@localhost", "BCC Name");

                msg 			= new MailMessage("*****@*****.**", "*****@*****.**");

                smtpHost 		= "localhost";
                smtpPort 		= 25;

                smtp			= new Smtp();
                smtp.Host 		= smtpHost;
                smtp.Port 		= smtpPort;

                // Add Smtp event listener
                SmtpEventListener listener = new SmtpEventListener(smtp);
        }