|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Technique
3 l1 S: U) x' q: D7 HUse the CCO.Email object to send email messages. 5 k& r9 v% ^: r, i! O+ C
C#
0 i! P+ h) ?9 r. Q. {4 e: NSystem.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage(); % ?5 e' s; R3 r" f# H0 ?' U @
email.From = fromEmail;
& V' Y$ ^; [& ]. oemail.To = toEmail;
& p* H6 D: Y$ K/ ?+ Y/ w- Semail.Subject = subject; $ s2 \) g6 W* ?' n" _) W
email.Body = body;
( D4 x. @8 B' l& ~% T% a: R5 y# yCCO.Email.setup_smtpmail_server_and_send(email); 9 P7 ?& S% ?/ k2 f
9 h5 A; j' |( F; ]: s. @+ D// Alternatively use the SendEmailToIdentity
$ T9 ?! d7 v0 N// The first argument is the Identity name to send the email message.
- c/ M! h4 _4 l+ ]9 H// The second argument is the subject text. / Q' q/ R# i8 B# o
// The third argument is the email body text.
: U; B: F; H) Q4 n/ x: o// The last argument is a user login name as the sender and ' K3 X/ R( L, s1 z# }3 M1 `7 ?
// if blank will use the logged in user name and _9 r3 o# y( s% h
// that User Item must have an email address as well.
* o( Q5 z# S: SCCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user);
* |2 U! M7 I3 ?return this.newInnovator().newResult("ok"); 9 U2 t& p$ X! S, P* X2 i
VB.Net + f; I& K K3 S4 c
Dim email = New System.Web.Mail.MailMessage()
3 G1 j; T9 @0 W0 _% ]2 o6 N6 Pemail.From = fromEmail 3 s7 _& l8 y5 v- r1 i
email.To = toEmail ' u' M3 ]) S6 _# c' |7 c
email.Subject = subject / P! l6 Z5 S( Y+ B' G# F5 d. x3 A
email.Body = body . e1 P3 n1 T9 r: _; ]' _! ~
CCO.Email.setup_smtpmail_server_and_send(email) ) ^4 [; g2 r+ {$ ]) e; c' T
. s; z: p4 q' K& \6 {+ y' r9 C! z' Alternatively use the SendEmailToIdentity " d- ^/ u; D( \
' The first argument Is the Identity name To send the email message. + W, O3 ^5 ]& U2 S& }' G
' The second argument Is the subject text.
( E- B( j4 u( C$ I* \$ C' The third argument Is the email body text.
. P! B9 Y6 N- \$ _' [# N' The last argument Is a user login name As the sender And * f0 X3 {6 D( ~# l9 ^* j- q
' If blank will use the logged In user name And + G! T( u0 D4 I* s# ^
' that User Item must have an email address As well.
' y$ ?4 N8 g" m, d* iCCO.Email.SendEmailToIdentity(identity,subject,body,user)
7 W: C! S3 @3 a6 X' D0 G1 n9 n% O
|
|