Technique * J8 R" G+ N9 ^* V5 ~1 C$ PUse the CCO.Email object to send email messages. " H& z: v: B' ?. A8 S% _. sC# ' ]+ q$ ]8 Z7 M+ I& |2 USystem.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage(); & @5 Q+ R2 `8 _
email.From = fromEmail; . p* j* s" n1 `0 F; l; a2 Zemail.To = toEmail; 7 ?! q" b& ~3 `' W
email.Subject = subject; 7 @. w- X9 C' f3 d, lemail.Body = body; ! @ Q. s( M1 Q. F/ X" o2 Y- S3 sCCO.Email.setup_smtpmail_server_and_send(email); & I* q, S' n* Q2 x7 |% a U9 k0 ^& J, T$ V0 N0 |' c& `* t
// Alternatively use the SendEmailToIdentity ' k9 W) \# ^ n* l# t l U
// The first argument is the Identity name to send the email message. 6 U: @8 j( {9 P% Z& K' F
// The second argument is the subject text. - F/ b7 t# c0 R; c% F+ N// The third argument is the email body text. - W8 E4 M! {5 n6 S( h; u9 Y5 W// The last argument is a user login name as the sender and % z* P l% w' p$ v// if blank will use the logged in user name and . s* ^! o7 t6 x _2 S
// that User Item must have an email address as well. - v7 @! v' D2 ~; ?$ j. q6 i$ y* }$ l7 i
CCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); . S$ y& H" |# U8 ereturn this.newInnovator().newResult("ok"); ! R4 E. Z! |4 O
VB.Net 3 X2 y3 i3 }# z* C& o$ w* jDim email = New System.Web.Mail.MailMessage() 2 X3 J( |1 x' e, P+ X9 W8 o/ |- Z
email.From = fromEmail 2 ]& S1 }- b' }2 v, kemail.To = toEmail 7 u. T5 ^+ {5 z6 |email.Subject = subject 1 ~6 e' S( ]4 @$ E: l
email.Body = body ; R0 L4 r" b; C0 @* K2 u3 h
CCO.Email.setup_smtpmail_server_and_send(email) ' w+ X2 v; x3 i3 d
# b: e# f7 M* i- M
' Alternatively use the SendEmailToIdentity % i' h7 C: A5 Z
' The first argument Is the Identity name To send the email message. 8 p8 S$ V G7 w6 p6 I! o- B' The second argument Is the subject text. ' o# j5 G( E$ V& [
' The third argument Is the email body text. . Y: ]" n# x$ P' K( L1 J7 {' The last argument Is a user login name As the sender And 5 [" _+ O" A. ?( J' k' If blank will use the logged In user name And 9 o1 W) g# @: X4 x6 k& H0 c1 Z7 E
' that User Item must have an email address As well. : C# J, x/ d9 `* b
CCO.Email.SendEmailToIdentity(identity,subject,body,user) N8 M" | u( _, R/ ]% N( z' d# @* N! c
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.doteam.tech