|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique
; |& X+ i2 ^$ u8 `# oUse the CCO.Email object to send email messages. ( z+ q- D8 T( w( [) i
C#
& t" w" f3 u$ W6 J0 @. O6 pSystem.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage();
; E. I+ O$ o, Q5 B4 G' l; Remail.From = fromEmail;
* U: }7 n! n5 J- C/ Eemail.To = toEmail;
3 o/ u1 p4 r0 I7 zemail.Subject = subject;
3 I& f: U) D% Femail.Body = body; . F9 ~7 N* \# j
CCO.Email.setup_smtpmail_server_and_send(email);
; g# r6 a: Y1 J$ u/ x; l" c1 V ) r# J8 ^8 S( C6 P0 I
// Alternatively use the SendEmailToIdentity % R9 g: |) @0 f2 o% C* L
// The first argument is the Identity name to send the email message.
" `" @' T3 F1 y2 m( Z// The second argument is the subject text. @7 k8 \4 R' A3 e
// The third argument is the email body text.
9 B: `- w0 H/ s+ G; q. p; Y( g/ j// The last argument is a user login name as the sender and
2 K' r5 O8 Z3 H// if blank will use the logged in user name and 9 D; [8 j) g* W3 z
// that User Item must have an email address as well. $ y. }4 l2 y( m; S6 C
CCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user);
) b1 o% v4 y8 N* K# kreturn this.newInnovator().newResult("ok"); " G* f3 L9 W& G
VB.Net 7 R* p' R, z1 @# I* E. a$ f
Dim email = New System.Web.Mail.MailMessage() + o. ?; d6 p. L% ?" q
email.From = fromEmail
. ?1 S; t0 f- X, U! l* Remail.To = toEmail - ?9 k3 M4 n# ?1 ]
email.Subject = subject 1 n- s" @6 @3 u& `9 K( w; D% t' y
email.Body = body
6 ]* m9 ~8 S; @/ ]+ }& I5 oCCO.Email.setup_smtpmail_server_and_send(email) 6 `- [+ l# Y4 _/ d( h' Y# V% P- U* s
3 @# m8 \& n/ m9 d' Alternatively use the SendEmailToIdentity ! h; M+ Q: E# T4 _6 r% C
' The first argument Is the Identity name To send the email message. / o* \) {( B( ?# i" E h1 L
' The second argument Is the subject text.
; i- X1 y# @. b& U' The third argument Is the email body text. ; I$ L* d% k5 C. y# `5 K) z* Y# x) x
' The last argument Is a user login name As the sender And ' O7 I/ S8 I1 G8 q$ a) y' O. Q) n
' If blank will use the logged In user name And
* s. Z- j7 `5 O) i4 T' that User Item must have an email address As well. # A/ X; w9 t8 D" m0 c2 _ W
CCO.Email.SendEmailToIdentity(identity,subject,body,user)
1 h( f8 A: ?7 C+ l: d! T; U$ [$ B8 p' e0 w+ K" Q, E
|
|