|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique
: N5 n* l8 G" j3 gUse the CCO.Email object to send email messages.
; e& f' b T0 L" c5 M1 EC#
5 f* ~# y. ?+ r* ?& a+ qSystem.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage();
/ t: `( f& l5 Y8 i. m9 bemail.From = fromEmail; ; y7 i) q" r4 D; N
email.To = toEmail; * K6 _' R4 r% s# @# t7 G P2 Z
email.Subject = subject;
3 a" Y& q3 {+ W) bemail.Body = body; 0 N2 n: a! u, G' S3 }
CCO.Email.setup_smtpmail_server_and_send(email);
% R8 p O2 u% Y- Z
9 |: z* j5 u) x, ]3 z// Alternatively use the SendEmailToIdentity
0 h# B. E$ c) \& @6 {0 U% L// The first argument is the Identity name to send the email message. 9 F6 P0 t" S3 p* ~- E4 w+ N I
// The second argument is the subject text. $ C% @# c7 o3 q, p" c/ G
// The third argument is the email body text.
( E! f {3 C+ H, D \* @// The last argument is a user login name as the sender and R/ l, ~1 \" ?- |. [% Y* H
// if blank will use the logged in user name and 2 ]+ {) C6 P* t* k, i. O
// that User Item must have an email address as well. - A. ?# D$ ]. S; P0 o# }
CCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); & B( D# V# a* h9 |
return this.newInnovator().newResult("ok"); 7 v% F1 p# Y7 w7 c r! q' d
VB.Net
6 i D) D: U. N; s4 LDim email = New System.Web.Mail.MailMessage() : r3 c* I* y" n! C X) C3 o
email.From = fromEmail / C& S' r1 d d1 J
email.To = toEmail 9 v4 ]6 K/ y7 W7 S* ^4 F
email.Subject = subject - ]( c; |- e1 S) c: p5 V3 {
email.Body = body 3 ]* |7 ?6 s3 e
CCO.Email.setup_smtpmail_server_and_send(email) 2 [! U! A7 G+ d9 t. ?- u5 h
) _$ d& h" m! L2 g( T( K' Alternatively use the SendEmailToIdentity
! S" A# p% H% R5 \' The first argument Is the Identity name To send the email message.
0 h' E( C% B. w( q. k; S# e1 ~' The second argument Is the subject text. $ X8 r2 j6 [# X1 c9 u
' The third argument Is the email body text.
2 V# _* P/ F" G: Q e' The last argument Is a user login name As the sender And d) ~0 s# J* ^1 X
' If blank will use the logged In user name And
7 D* u' m2 m0 i( M' that User Item must have an email address As well.
q/ f+ N0 _9 s4 ^CCO.Email.SendEmailToIdentity(identity,subject,body,user) $ _8 y2 j; D1 |! G) V% T6 w
' w/ q( V% c# a* i G |
|