|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique
8 h' ~% z% X* Z8 s3 I# MUse the CCO.Email object to send email messages. ! o2 M7 s0 [/ }; U. ~6 J5 u
C# % E& B" h f. D& g
System.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage();
) x$ W" c+ D% w- o& t! _" k: zemail.From = fromEmail; % U* }' D: Y' ^! v
email.To = toEmail; 9 b) |5 ~: j. ?; ?2 t. X
email.Subject = subject; ( {+ U8 [" q4 j4 t
email.Body = body; - q. V; ~* T" j7 c: S
CCO.Email.setup_smtpmail_server_and_send(email);
# U; |. o. K) p H4 {' ^1 `% t
- U' M; t4 Z, {. d// Alternatively use the SendEmailToIdentity . t! C4 M' u: k% A) S
// The first argument is the Identity name to send the email message. 7 O$ i- g# E: e4 T
// The second argument is the subject text.
! C( ?9 h* `8 v0 M2 q( z$ w// The third argument is the email body text.
& B' H, m; Q% y b// The last argument is a user login name as the sender and
6 H7 {; {. f6 @' [// if blank will use the logged in user name and 6 ^9 _% P, R A; L' G! t
// that User Item must have an email address as well.
9 U \& Z9 f4 d% ACCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); , Z) D# c, ~6 G: k# d# j7 z
return this.newInnovator().newResult("ok");
% O9 ]# ^7 y* J4 u# C, y, A2 L VB.Net
& \8 E4 p9 G( i& q% BDim email = New System.Web.Mail.MailMessage()
1 }- `1 w) ^# @, j: wemail.From = fromEmail * I9 P& O9 }) L. m
email.To = toEmail * @1 W: V+ n: u) J3 j1 j! A1 Q
email.Subject = subject
7 d: O& K9 L( g6 C" l4 J: Iemail.Body = body 3 e& O- H' \9 o! A1 c
CCO.Email.setup_smtpmail_server_and_send(email) ) b2 {2 ~! H7 H! M1 c9 ?
) ]* \7 a9 T$ q, g: V' Alternatively use the SendEmailToIdentity 2 J1 H1 h+ ^/ ^1 m0 [) E
' The first argument Is the Identity name To send the email message. / g* E( x/ z) Z l
' The second argument Is the subject text.
& O2 B3 c0 h& ?0 V6 u' The third argument Is the email body text.
+ J- c) w1 ]) o; i1 t' The last argument Is a user login name As the sender And
+ F$ b0 E- t9 j! }0 \8 H( W" M' If blank will use the logged In user name And
" ?& U# D! ] c* x- {* D8 `, D) w' that User Item must have an email address As well. 0 E8 E5 z, ^7 l, C! _
CCO.Email.SendEmailToIdentity(identity,subject,body,user)
, e( ~4 x" A' m0 y- j
2 |1 a; w2 X5 n" y8 j% P" O |
|