|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique & [% F {4 k& Z; Z; ^- |
Use the CCO.Email object to send email messages. 6 [9 ]0 I) r! z
C# 4 v8 z' T/ Q, W8 I5 l3 {
System.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage();
3 l4 S0 B, K: h0 semail.From = fromEmail;
" N4 E9 O5 p# c" N6 T% i( Uemail.To = toEmail;
2 L7 H& p, p. N- k+ ]3 Uemail.Subject = subject;
+ @( ~( T5 h0 ]# y. W# K; Zemail.Body = body;
( A1 P; {+ R4 ~8 ]CCO.Email.setup_smtpmail_server_and_send(email); & c* Y6 Z0 x, r( y8 `4 W/ }
' O5 P1 i+ o2 a" l: e* x// Alternatively use the SendEmailToIdentity 6 B: H0 y$ f( H5 D& d
// The first argument is the Identity name to send the email message. ( t* W; J' g8 Z4 [! p
// The second argument is the subject text. 4 z5 P& i* p" _! Q$ F. d. j; i/ j# {
// The third argument is the email body text.
& a2 i& ?) ?2 k/ `6 G1 P// The last argument is a user login name as the sender and $ o" l& P) R( p t
// if blank will use the logged in user name and - L1 N8 @! j4 p& z! O- x- n
// that User Item must have an email address as well.
. X; e; y+ h% Z) C8 X1 A# r9 Q# jCCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); 9 h& Q2 f- E% u6 d% D& ] b
return this.newInnovator().newResult("ok");
! [2 q0 X9 X# w d) n VB.Net
1 D% V# c }9 R1 SDim email = New System.Web.Mail.MailMessage() - L1 a2 c8 v9 v) z# J, e
email.From = fromEmail 7 v* z/ \0 p5 q }' Y
email.To = toEmail + P+ n C3 i$ g# R
email.Subject = subject - }% B, w0 W$ e O
email.Body = body , u! Y2 K1 Z4 `0 f$ b
CCO.Email.setup_smtpmail_server_and_send(email) 6 ?% X6 t0 e" ]+ ^/ g9 e2 C% L
4 u- e! U/ O# N1 b6 ~
' Alternatively use the SendEmailToIdentity $ I9 p% T6 { d: R# {9 N
' The first argument Is the Identity name To send the email message. . j5 k Z6 i3 Y' y: T! m
' The second argument Is the subject text. . w/ U/ f0 {4 X+ u, i6 `
' The third argument Is the email body text.
+ T( V9 h& w8 I0 Y$ M0 {5 G' The last argument Is a user login name As the sender And
; _8 z7 }$ h5 ^7 p! F; G8 j' If blank will use the logged In user name And
) `$ Q/ {( G1 \/ j% O2 ]' that User Item must have an email address As well. ; K2 X2 l, b% b
CCO.Email.SendEmailToIdentity(identity,subject,body,user) 7 d7 L7 }# G8 X+ n( i
/ V( a8 g4 h1 n3 D$ J
|
|