MaxScript通过.net发送邮件
Fn SmtpSendMail argSmtpAddress argSenderAddress argSenderPassword argTargetAddress argTitle argMessage = ( tempSmtpClient = DotNetObject "System.Net.Mail.SmtpClient" argSmtpAddress tempSmtpClient.UseDefaultCredentials = false tempSmtpClient.Credentials = DotNetObject "System.Net.NetworkCredential" argSenderAddress argSenderPassword tempSmtpClient.DeliveryMethod = (DotNetClass "System.Net.Mail.SmtpDeliveryMethod").Network senderAddress = DotNetObject "System.Net.Mail.MailAddress" argSenderAddress targetAddress = DotNetObject "System.Net.Mail.MailAddress" argTargetAddress tempMail = DotNetObject "System.Net.Mail.MailMessage" senderAddress targetAddress tempMail.Sender = senderAddress tempMail.IsBodyHtml = false tempMail.BodyEncoding = (dotnetClass "System.Text.Encoding").UTF8 tempMail.SubjectEncoding = (dotnetClass "System.Text.Encoding").UTF8 tempMail.Subject = argTitle tempMail.Body = argMessage tempSmtpClient.Send tempMail )