smtpclient.Host = "ホスト"; smtpclient.Credentials = new System.Net.NetworkCredential("ユーザー", "パスワード"); smtpclient.Port = 25; //場合によっては587だったり。環境に合わせてね smtpclient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network; smtpclient.Timeout = 60 * 1000; smtpclient.Send(From.Address, To.Address , Subject, body); smtpclient.Dispose()
ネタ元