Technique 0 N* w2 [5 }; C7 W. R7 {Use the CCO.Email object to send email messages. . p3 t3 L- T; T) MC# & \( A" ?6 z b" w v8 VSystem.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage(); ) O0 _% G6 W9 ~; l
email.From = fromEmail; 1 B( ^( T9 P9 f: ^/ H R; W( Iemail.To = toEmail; % x5 o, ^. V( g$ W0 w! H
email.Subject = subject; * D% @. S7 R1 [email.Body = body; $ @; O, I6 q) ]& ECCO.Email.setup_smtpmail_server_and_send(email); % o$ ^) C, n8 {* u( [4 Q4 Q: m$ y % S9 ]' F5 B/ k H- t// Alternatively use the SendEmailToIdentity * x2 U4 R) k8 s7 o* C1 O
// The first argument is the Identity name to send the email message. . x, z% o. h* e* S! A
// The second argument is the subject text. $ Q( ^6 `6 ]3 F# U
// The third argument is the email body text. " U) q" T0 [; P: Z: j1 z1 a0 d
// The last argument is a user login name as the sender and " b6 K& p0 t+ Q2 ]// if blank will use the logged in user name and $ ? A7 T# d' a5 f+ z// that User Item must have an email address as well. 2 Z; G% G/ [5 M0 a# [9 BCCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); + U2 W$ X( a4 Greturn this.newInnovator().newResult("ok"); 7 d& n6 _" ?4 |" t* R' f* x VB.Net 9 k: `! l# \1 o* D
Dim email = New System.Web.Mail.MailMessage() 7 Y' E1 A. I- O. I8 B+ vemail.From = fromEmail V# ^- a0 W! }( X [1 j/ g
email.To = toEmail ! B% ~ ~. U$ q4 \; o3 ^6 J* G. Iemail.Subject = subject q0 U9 X' W! A# D4 }5 G" r+ h
email.Body = body * ~* {, k- K% J ^7 JCCO.Email.setup_smtpmail_server_and_send(email) " O5 L! ?; Q" R, `3 p5 Z
7 x* G8 R" T8 U* p' d' r: \& Y+ ~
' Alternatively use the SendEmailToIdentity 5 a6 y7 D7 k) ^
' The first argument Is the Identity name To send the email message. ; c- Z2 t9 [# g1 Z& W3 S7 ^8 K' The second argument Is the subject text. 2 a3 ?0 [) M" g& G/ o# T& R
' The third argument Is the email body text. 0 c5 H& p* U0 M' D+ \' The last argument Is a user login name As the sender And * J: t/ ~3 M( M* M5 i# w' If blank will use the logged In user name And . O% f9 z3 j( W, N6 L1 I* y; R) F! ~
' that User Item must have an email address As well. 2 E# E' ]/ z. c
CCO.Email.SendEmailToIdentity(identity,subject,body,user) & m6 z& h5 g6 S3 E+ q; ^( G9 E) D3 z, M/ ~
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech