【Aras二次开发源码】服务器端发送电子邮件方法
TechniqueUse the CCO.Email object to send email messages.
C#
System.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage();
email.From = fromEmail;
email.To = toEmail;
email.Subject = subject;
email.Body = body;
CCO.Email.setup_smtpmail_server_and_send(email);
// Alternatively use the SendEmailToIdentity
// The first argument is the Identity name to send the email message.
// The second argument is the subject text.
// The third argument is the email body text.
// The last argument is a user login name as the sender and
// if blank will use the logged in user name and
// that User Item must have an email address as well.
CCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user);
return this.newInnovator().newResult("ok");
VB.Net
Dim email = New System.Web.Mail.MailMessage()
email.From = fromEmail
email.To = toEmail
email.Subject = subject
email.Body = body
CCO.Email.setup_smtpmail_server_and_send(email)
' Alternatively use the SendEmailToIdentity
' The first argument Is the Identity name To send the email message.
' The second argument Is the subject text.
' The third argument Is the email body text.
' The last argument Is a user login name As the sender And
' If blank will use the logged In user name And
' that User Item must have an email address As well.
CCO.Email.SendEmailToIdentity(identity,subject,body,user)
页:
[1]