Technique 9 u8 e+ n, j+ I( J5 \Use the CCO.Email object to send email messages. ' c( x1 p& m7 v. k+ a
C# - U( Q( X& i9 v
System.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage(); 3 s+ W* S2 ~3 o- o% K# n9 Jemail.From = fromEmail; ( ]2 f) X8 J* _7 g" C7 d% X4 @
email.To = toEmail; % o1 L; Y/ A1 F- g( y) Y$ }; \
email.Subject = subject; ; \! X- C9 \0 Jemail.Body = body; * k2 t$ G% g% S
CCO.Email.setup_smtpmail_server_and_send(email); & b' }" B0 u& f7 W7 q7 v1 p o7 D7 p. T& f% @
// Alternatively use the SendEmailToIdentity # d4 S) g1 x# P// The first argument is the Identity name to send the email message. 3 x& {" c( V- }' I$ C' k
// The second argument is the subject text. ! r; |% D- f4 x# Y }/ H// The third argument is the email body text. 8 U! T1 J+ A+ k0 B2 J' r5 b
// The last argument is a user login name as the sender and 5 J+ f }; N2 @$ f8 M- Y9 A, C// if blank will use the logged in user name and 8 o- b: U0 \" w* ~9 d" X6 T// that User Item must have an email address as well. 1 Q# O! O! n4 x! q- H' I- e5 B
CCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); 7 N; p! U% D5 M0 k: r( K
return this.newInnovator().newResult("ok"); ! Y- r+ \6 Y; G* B VB.Net * d+ ~' M% T( Q. L
Dim email = New System.Web.Mail.MailMessage() " }& _3 P5 n& p$ }) I8 r9 O
email.From = fromEmail / l- x) A6 @/ [email.To = toEmail % \, z- p9 @# ~) ?+ Jemail.Subject = subject 4 O6 W4 R7 O) A; L% ~5 g* V
email.Body = body Y; o" Z4 L; h: s7 z1 mCCO.Email.setup_smtpmail_server_and_send(email) 4 k, [# Q( u# g ! ^% U( w( D3 k" x W* e' Alternatively use the SendEmailToIdentity , ^! V' \3 D: n9 c! R
' The first argument Is the Identity name To send the email message. 8 K9 N, n+ G8 I- w1 h$ j0 g
' The second argument Is the subject text. * C& a( A: h9 d. P$ ]3 @' The third argument Is the email body text. ( K b n* |7 B; ^8 z& m
' The last argument Is a user login name As the sender And $ `5 c$ T$ d( _# h; H' If blank will use the logged In user name And * x8 A7 m/ U& ?, F) X' y, M' that User Item must have an email address As well. 3 J3 B, ] O3 k# t2 R& b; Y5 M) `CCO.Email.SendEmailToIdentity(identity,subject,body,user) + Z6 T: t8 E8 h% U1 k# j9 |
( ~: m& z8 z1 W( K \$ V X/ W2 l
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.doteam.tech