PLM之家PLMHome-国产软件践行者

【Aras二次开发源码】服务器端发送电子邮件方法

[复制链接]

2018-8-1 14:08:15 3761 0

admin 发表于 2018-8-1 14:08:15 |阅读模式

admin 楼主

2018-8-1 14:08:15

请使用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
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了