|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique - C% }/ e0 `4 T% Z' v
Use the CCO.Email object to send email messages.
% G/ o' f# Z* H& e3 R2 R4 `! v* j2 EC#
a- Y/ M2 d1 r5 bSystem.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage();
, L( G- f. }8 Eemail.From = fromEmail;
2 z' Z/ d- N9 x) ~9 Wemail.To = toEmail; # _, J+ ]+ V7 a5 `! i
email.Subject = subject; : t( f" T' v! s/ a" d( t
email.Body = body;
; N8 F8 u2 J! ]; l4 F3 tCCO.Email.setup_smtpmail_server_and_send(email);
5 e; F% y ~7 ?( F6 T0 h o
9 ]& d2 m/ \6 O" r// Alternatively use the SendEmailToIdentity E$ {5 s8 q- A0 I3 F$ n
// The first argument is the Identity name to send the email message. 7 D# C* q( L' H. a
// The second argument is the subject text.
# l" z/ y- s0 ?) X// The third argument is the email body text. % I. K2 q2 {! n2 s
// The last argument is a user login name as the sender and ; f# g- t3 ~9 V# m/ b9 |
// if blank will use the logged in user name and
. Y: p, Q) \) `! K5 K7 F# H// that User Item must have an email address as well. ) e5 L' X8 @* n; h5 Y% F6 T, x3 ~& v
CCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user);
" k9 L9 U6 Q1 A; dreturn this.newInnovator().newResult("ok");
% @( H6 r& F3 W) I VB.Net " B( x+ S4 c E; i# S( M( ^- i
Dim email = New System.Web.Mail.MailMessage()
0 P/ [! {' x+ t" wemail.From = fromEmail
_( B) M1 ^. Qemail.To = toEmail
( b1 ?2 h$ p; `) k8 Wemail.Subject = subject
% f* ^, M1 E' Z: E0 Z* B- wemail.Body = body # I \( d6 a; i0 \
CCO.Email.setup_smtpmail_server_and_send(email) 4 T5 n: X5 p. Y4 V
$ ^* G! z8 H& k; j
' Alternatively use the SendEmailToIdentity 7 V, |) F- ~& G2 d
' The first argument Is the Identity name To send the email message. , V, _# d2 \; R
' The second argument Is the subject text. ' ?% O9 q) r- o Y
' The third argument Is the email body text. 8 _# {0 ]% W5 F
' The last argument Is a user login name As the sender And + \7 p4 L2 M) Y3 K5 N4 O
' If blank will use the logged In user name And 2 P& v5 e! L. E0 r& F
' that User Item must have an email address As well. ) c9 `$ b* G6 R" q. j" h, `9 `3 N- |. A
CCO.Email.SendEmailToIdentity(identity,subject,body,user) : B ^4 T6 W4 [/ l- m9 r) k& ^5 Y
' T9 X2 r B& h$ l, ~ |
|