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

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

[复制链接]

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

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

admin 楼主

2018-8-1 14:08:15

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
Technique  
9 C5 K& Z& U& F9 ^& B4 y$ rUse the CCO.Email object to send email messages.
* C1 x2 i* H9 ?# LC#  2 U9 ^/ {# R+ }* t" @+ T8 z
System.Web.Mail.MailMessage email = new System.Web.Mail.MailMessage(); 6 v; P& k+ J7 X
email.From = fromEmail; / I7 v( V) k& _5 p7 Z
email.To = toEmail; - r0 @9 e: M. ?  D* O" m. f
email.Subject = subject; ) m3 t1 q2 L( G: S
email.Body = body;
# e0 y2 }1 ?. e: O8 o! U  nCCO.Email.setup_smtpmail_server_and_send(email);
9 @# o$ e2 @8 o$ V9 q * W  u" j6 t. I6 c: i
// Alternatively use the SendEmailToIdentity
- T9 I: S% r8 d$ `" E, [, f8 y// The first argument is the Identity name to send the email message. $ }$ h9 v$ b2 X' l" w8 i1 P8 I3 ]
// The second argument is the subject text. 9 Z$ G6 `0 i' \, j4 p0 F
// The third argument is the email body text. 4 L  d0 H- b( R3 h
// The last argument is a user login name as the sender and ) @( R% F/ {& i5 |
//   if blank will use the logged in user name and 8 g" |$ E. w; ^: R+ k
//   that User Item must have an email address as well.
8 }1 h, ?- p5 Y4 ?. UCCO.Email.SendEmailToIdentity(ref identity, ref subject, ref body, ref user); 8 V/ g( f  E1 R. y& Q8 S
return this.newInnovator().newResult("ok"); ) [) J- {+ e; E  n& D
  VB.Net  ( R" q  B) x. s/ Z8 r" k( }( V4 |
Dim email = New System.Web.Mail.MailMessage()
# v2 y- u: t$ h- p2 A1 Kemail.From = fromEmail
( M+ s( B9 x' g6 ?  |$ J& X6 Pemail.To = toEmail
* @% B' o) l  c" kemail.Subject = subject
- P0 y6 D4 \. f0 g/ d0 nemail.Body = body
6 K2 p+ {: @7 A# b7 VCCO.Email.setup_smtpmail_server_and_send(email)
9 [5 `1 U6 a( D4 o& g
( ?4 O' n. N# T* C' Alternatively use the SendEmailToIdentity
% A, O3 j0 C  B3 o' The first argument Is the Identity name To send the email message.
* T' X0 i  w$ H0 ]- C7 _$ y3 ?: p' The second argument Is the subject text.
. r1 h; m. ~3 B' The third argument Is the email body text. 3 M$ J) w2 Y  f
' The last argument Is a user login name As the sender And + p/ F/ ~2 `! s* _1 S1 [& P
'   If blank will use the logged In user name And 4 ?3 ]1 D$ y0 d. g2 @2 J
'   that User Item must have an email address As well. , i/ J$ b* K6 X: j# \- [6 j: d
CCO.Email.SendEmailToIdentity(identity,subject,body,user) ( q5 Z% K# `* w5 e/ t5 G
! I' n- Y' N0 D9 O
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了