|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique
6 v8 ]! k8 H( f5 }) m4 M* Q- XUse the CCO.Email object to send email messages.
( o% I2 F4 D a5 RC# 5 w, b4 R- j% a1 @/ f
System.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage();
( |8 P& ]- }& f3 b! t7 P2 \email.From = fromEmail;
7 e; M0 i/ q0 H" w1 ^- V3 ^ Qemail.To = toEmail;
% m3 }; X* D2 q" X3 t- aemail.Subject = subject; # u& @& O1 t7 @3 @
email.Body = body; 2 Q4 Z4 _8 O1 {+ ?) L
CCO.Email.setup_smtpmail_server_and_send(email);
6 c+ |4 u. t4 Q, S4 w - J" K, |4 A# ` Y, r/ p7 ]8 E
// Alternatively use the SendEmailToIdentity
( L/ E, _" ]+ Q// The first argument is the Identity name to send the email message. 9 M; c; @6 M$ C4 T/ b% W3 n+ C
// The second argument is the subject text. $ R) l8 A0 R/ F. K' u. j
// The third argument is the email body text. 3 |5 u3 u# a" \( H3 M3 x% T2 G. R# z7 y; q
// The last argument is a user login name as the sender and / m- d$ P" Z q# E; Q c! m2 v4 z
// if blank will use the logged in user name and
& z$ G0 A/ R& e$ D8 m4 C// that User Item must have an email address as well. $ c4 m* x+ D- n, k
CCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); 7 c- }! I' }1 e& N! A& f! }
return this.newInnovator().newResult("ok"); : _, ]( p6 K) r1 B/ E# _' x8 Q# E
VB.Net
/ z+ Z- G& k4 UDim email = New System.Web.Mail.MailMessage()
( n3 U6 c+ m* J: Lemail.From = fromEmail 4 D: L' v0 {5 F
email.To = toEmail & B, s* B( d" X
email.Subject = subject
5 A% I6 b( }& \5 S7 B& ]email.Body = body
6 K2 n0 C' W- p( f0 u. mCCO.Email.setup_smtpmail_server_and_send(email) 0 X- M6 J$ K: }. Z$ U
( ?: A1 O) d: [2 t8 t/ B' Alternatively use the SendEmailToIdentity / B) u7 C1 x4 j! [ l
' The first argument Is the Identity name To send the email message.
3 B( Z5 f& R; m9 S0 ~0 V% e' The second argument Is the subject text.
3 V2 W0 u% o: c' The third argument Is the email body text.
" F, N0 M- z; Y' }4 Q' The last argument Is a user login name As the sender And 1 K4 d$ u' B2 Y2 s+ `
' If blank will use the logged In user name And " a/ c5 l# g, E, h( x# k* j) w
' that User Item must have an email address As well. + e6 F' R9 v( M! t5 G& T% `
CCO.Email.SendEmailToIdentity(identity,subject,body,user)
3 r" h* J& s8 b, C7 `" F7 g, O' B) p8 a1 {
|
|