cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict E-mail sender in the Mail sender communication channel.

Former Member
0 Kudos

Hi All,

My scenerio customers want to Email with attachment to PI server. I've successfull tested this scenerio without one open issue. Right now anyone having email id can send mail to PI server.

I want to restrict the senders list. Is this possible in the sender Mail adapter configuration.

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>Right now anyone having email id can send mail to PI server.

But in production, only business users are going to send mail. ofcourse you can configure to use company's corporate mail server which contain valid email ids.

>> I want to restrict the senders list. Is this possible in the sender Mail adapter configuration.

Not possible. PI has no control to restrict sender mail server.

Former Member
0 Kudos

Thanks Debashish for your reply and Thanks Baskar for your suggestion and I took your suggestion. Is there any way to call two different interfaces when two emails are received by the same sender email adapter? Only distinction in the email will be the subject. For eg. <some X email address> sends two emails to PI server with subject "One" in first email and second email with subject "Two". These two emails should call two different interface mapping. Please help me with

suitable blog or with your suggestion.

Thanks,

former_member854360
Active Contributor
0 Kudos

Hi,

Its possible.

You need to configure 2 receiver

1)MailA

2)MAILB

in receiver determination.

then you need to route it based on Subject using condition in receiver determination.

Use the below XSD to create your sender mail message type

<?xml version="1.0" encoding="utf-8" ?>
<!--
SAP takes no position regarding the validity or scope of any intellectual property or 
other rights that might be claimed to pertain to the implementation or use of the 
technology described in this document or the extent to which any license under such 
rights might or might not be available; neither does it represent that it has made any 
effort to identify any such rights.

Copyright © SAP 2003-2004. All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative 
works that comment on or otherwise explain it or assist in its implementation may be 
prepared, copied, published and distributed, in whole or in part, without restriction of 
any kind, provided that the above copyright notice and this paragraph are included on all 
such copies and derivative works. However, this document itself does not be modified in 
any way, such as by removing the copyright notice or references to SAP.

This document and the information contained herein is provided on an u201CAS ISu201D
basis and SAP DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 
ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY 
IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-->
<xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30" 
  xmlns:xi="http://sap.com/xi/XI/Mail/30" 
  xmlns:xs="http://www.w3.org/2001/XMLSchema">

<!--
  * Mail
  -->
  <xs:element name="Mail">
    <xs:annotation>
      <xs:documentation>Mail package for XI - Mail Adapter</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Subject" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="From" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="To" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="Reply_To" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="Content_Type" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="Date" type="xs:dateTime" minOccurs="0"></xs:element>
        <xs:element name="Message_ID" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="X_Mailer" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="Content" minOccurs="0">
          <xs:annotation>
            <xs:documentation>any type</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="encoding" type="xs:string"></xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name="MailReceipt">
    <xs:annotation>
      <xs:documentation>Mail Receipt for XI - Mail Adaper</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Server" type="xs:string"></xs:element>
        <xs:element name="Format" type="xs:string"></xs:element>
        <xs:element name="UseMailPackage" type="xs:boolean"></xs:element>
        <xs:element name="Encoding" type="xs:string"></xs:element>
        <xs:element name="Subject" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="From" type="xs:dateTime" minOccurs="0"></xs:element>
        <xs:element name="To" type="xs:string" minOccurs="0"></xs:element>
        <xs:element name="Date" type="xs:dateTime" minOccurs="0"></xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>


</xs:schema>

and use mail package in sender mail adapter.

Then your mail will come in XI in the above format.

then based on subject field you can conditionaly determine the receiver.

Message Protocol
u25CF      XIALL

In this mode, the content of the RF C822 e-mail matches the content of the XI message. The XI message is a multipart MIME message with a SOAP envelope as its first part. See also: Messages, under XI Message Protocol.

u25CF      XIPAYLOAD

In this mode, the content of the e-mail is put in the payload of the XI message. If you do not set the Use Mail Package indicator, the information about the sender (From), receiver (To), and subject of the e-mail is lost.

http://help.sap.com/saphelp_nw70/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm

former_member854360
Active Contributor
0 Kudos

Hi,

Please refer the below thread for possible solutions.

There are no direct solutions at adapter level. If you want to do this at adapter level then you need to write some custom adapter module.

Regards,

Debashish