二维码

[教程] 邮件发送配置SCOT

feijibin发表于 2015-06-08 10:21feijibin 最后回复于 2015-06-08 10:21 [复制链接] 7701 0

send email from SAP
The Details that are required before configuration.

1. SMTP Mail Server Domain Name
2. SMTP Port Number (usually 25).

It is required to configure SAPconnect settings for every client that is used for send processes (E-mails, Faxes, SMS).

Step No 1

Go To Tx Code SCOT

1. Enter the Value for Default Domain

Under Settings -> Default Domain, define the domain of the SAP system client. This allows for the following to take place:
1.1* The SMTP plug-in logs on to the mail server using the domain as ID
1.2* The message ID of the outbound e-mails is assembled with this domain.
1.3* If an SAP user who does not have an Internet mail address sends an e-mail, a sender address consisting of the SAP user name and this domain is generated.
1.jpg
 
Choose the Menu Option
Views -> Nodes -> in the subsequent screen, expand INT -> double click on SMTP

2.jpg

Step No 2 In the Subsequent Screen… enter the following informations.
How often the Mail should be sent. (mostly every 5 minutes)
Check the “checkbox” “Node in use”
Enter the “SMTP Mail Server Host Name”
Enter the SMTP Port Number (usually 25).
Click on the button “Set”.
mail host:
sicf->直接点执行->选中SAPconnect->service菜单->activate就可以了
或者填写所要发送到的邮件服务器地址
3.jpg

 
Step No 3 In the Subsequent Screen… enter the following informations.
Address Areas :- To which all address (domains) the mails can be sent.
“*” means emails can go to any E-Mail Addreses, while *yahoo.com means the mails can go to only to users in the yahoo.com domain
4.jpg

Step No 4
Go to the menu option
View -> Jobs
In the subsequent Screen, Click on the Create Button

5.jpg

 
Step 5
In the subsequent screen, enter some job name.
Step 6 In the subsequent screen, Click once on the “SAP&CONNECTALL” and double click on the button “Schedule Job”.

6.jpg

Step 7 In the subsequent screen
Click on the Button “Schedule Periodically” and select how often the Background job should run (mostly every 5 minutes)
Click on create button
7.jpg

A new node will appear in the Jobs screen.
In Tx Code SM37, check whether the New Job, is scheduled or not.
 
●sap邮箱配置
参考http://mf325609.blog.163.com/blog/static/123992520097315548837/
在dev系统上试验。根据老白博客上的步骤来做的,加进了自己的理解。
1. 配置参数文件Profile parameter(RZ10)
点修改,新建参数icm/server_port_1 赋值为“ PROT=SMTP,PORT=25”
a)icm/server_port_<*> = PROT=SMTP,PORT=<port>
事务码RZ10进去,选择实例参数文件,选择扩展。来到参数配置界面,默认情况下已经有一个参数文件icm/server_port_0 = PORT=HTTP,PORT=XXXX(每个服务可能不一样),那么这里的<*>就是要根据你的参数文件的具体情况,如果已经有了_0,这里你就需要设成_1,以此类推,PORT一般设置成25,这里还有一个选项是TIMEOUT可以设定等待邮件服务器回复时间的最大值。这里我的参数文件时:icm/server_port_1 = PROT=SMTP,PORT=25
新建参数is/SMTP/virt_host_0 赋值为“ *:25;”
b)is/SMTP/virt_host_<*> = <host>:<port>,<port>,...;
定义虚拟邮件主机,主要用来接收邮件的,_<*>的设置通上。要注意,参数值最后是有一个分号的。这里我的参数文件是is/SMTP/virt_host_0 = *:25;
完成后保存,激活。配置完需要重启服务,参数才能生效
2.配置用户(SU01)
a)对于每一个client,需要创建一个用户作为邮件的接收者,比如我创建了一个用户叫做MAILUSER,用户的类型设置为service,并给该用户赋profile S_A.SCON
打开SU01在登录数据标签中,我修改了自己的用户名的用户类型diaglog类型为service类型。
注:第一次我把用户类型改为了系统用户,第二天再登录系统时提示用对话用户登录。所以记得把类型修改回来,否则重新登录系统时可能登录不上。因为系统用户和通讯用户不允许使用SAP GUI登录。service类型可以使用SAP GUI登录。详见sap用户类型.txt
b)对于每个用户来说,如果需要发送或者接收邮件的话,也需要在为其配置email地址,在su01中的地址标签的E-mail中配置即可,通讯方式为remote email
3.client assignment(tcode:SICF)执行这个事务码,进去后
点执行
(上图为已激活的,未激活时为灰色的)
进去后可以看到STMP servers,默认应该是灰色的,双击SMTP servers,配置以下几个地方
a) Host data 主机数据,对于 Profile Parameter Number,输入 "is/STMP/virt_host_<*>"中的<*>的值,一般可能是0,如果不存在的话,下面会有提示的。
b) Service data(貌似就是上图的登录数据,反正我就是在那里填的),输入接收邮件的相关信息,client以及前面创建的MAILUSER和密码、语言等信息。
c) Handler list,在第一个位置输入CL_SMTP_EXT_SAPCONNECT
完成以上配置后,右键点击SMTP servers,选择激活。
4.SAPconnect administration(tcode:SCOT)

a)菜单栏 设置----Default domain,此处我写的是公司的邮件服务器
这个邮件的默认域名比如sap.com,那么如果在你发送邮件的时候收件人地址如果只写test的话,系统会自动加上@sap.com,如果收件人地址是全的话,这个domain不维护关系也不大
b) 维护SMTP节点:视图----节点Nodes—打开节点
或者双击上上图SMTP后弹出对话框,维护以下信息

勾上 "Node in user".
在MAIL HOST和MAIL PORT下面,指定发送邮件服务器的地址,比如如果是163的话,就应该是smtp.163.com
这里MAIL HOST填写我公司邮件服务器地址,MAIL PORT填写25
选中Internet的Set,弹出新对话框,指定接收地址的地址区域,一般用*表示所有邮件都用SMTP来发送。其他信息用默认。

(这里SAPconnect的信息可以有两种方式显示的,如果双击SMTP节点弹出的是JOB的信息的话,选择菜单中SYSTEM STATUS,切换到为另一种显示方式即可。)
c)Send job,选择菜单中的视图View-->职务Jobs,可以检查是否已经有Jobs被调度了
选择Jobs->Create,并指定Job名称,点执行按钮
选择SAP&CONNECTALL变式,并选择Schedule Job
选择 Schedule periodiacally定期计划,指定时间间隔,比如10分钟,选择创建。
到这里,基本配置成功了。
可以在SBWP中,选择发送邮件,来测试配置是否成功,输入收件人的邮件地址,点击发送。如果配置成功的话,收一下邮件,应该收到了来自登陆SAP GUI的账号中配置的邮件地址的邮件了。
PS:一开始只可以往公司邮箱发邮件,往外部邮箱发送时显示发送成功但总是收不到。把scot----smtp节点里的mail host改成公司邮件服务器的IP即可收到(不知为啥)。外部邮箱收到sap发送的邮件。但是,发往网易的邮件有收到,发往雅虎的邮件却没收到。

回复

使用道具 举报

feijibin

SAP初级小粉

  1. 1 主题
  2. 12 帖子
  3. 73 积分

Ta最近发表

快速回帖

本版积分规则
您需要登录后才可以回帖 登录 | 注册有礼

快速回复 返回顶部 返回列表