Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Text;
Using System.Threading.Tasks;
Using ActiveUp.Net.Mail;
Namespace ConsoleApplication1
{
Class Program
{
static void Main (string[] args)
{
Send ();
}
public static void Send ()
{
Message mail = new Message ();
Mail. from = new Address ("from");
Mail. Charset = "Utf-8";
Mail. contenttransferencoding = contenttransferencoding.base64;
Mail. Date = System.DateTime.UtcNow;
list<string> toList = new list<string> ();
Tolist.add ("Tomail");
Receive address
foreach (Var to in ToList)
{
Mail. To.add (to);
}
Header is also set to encode Utf-8
Mail. Subject = Codec.rfc2047encode ("Test using 様", Encoding.UTF8.BodyName);
Message content
Mail. Bodyhtml.charset = "Utf-8";
String body= "as promised, the requested Document.<br/>regardsjohn";
Mail. Bodyhtml.text =body;
Try
{
Smtpclient.sendssl (mail, Mailhost,userid, Mailpass, Saslmechanism.login);
}
catch (Exception)
{
Throw
}
}
}
}
. NET active up mail message delivery