Header problems with e-mail messages....
Eduardo Pisatti
Eduardo.Pisatti at basf-arg.com.ar
Mon Apr 26 12:26:33 EDT 2004
Hi Edwin,
The following is used by us to send mail, internal and external, may be
this can help you.
In OSSS1 you can put for example: From, To (extern mail address), email of
reply (external too), etc.
FUNCTION ZAR_EMAIL.
*"----------------------------------------------------------------------
*"*"Interfase local
*" IMPORTING
*" REFERENCE(PASUNTO) TYPE SOOD1-OBJDES
*" REFERENCE(PDIREC_EMAIL) TYPE SOOS1-ADR_NAME
*" REFERENCE(PORD_SPOOL) TYPE SOOS1-SNDSPO OPTIONAL
*" TABLES
*" PTEXTO STRUCTURE SOLI
*"----------------------------------------------------------------------
DATA BEGIN OF OBJECT_HD_CHANGE. "SAPoffice: object definition,
INCLUDE STRUCTURE SOOD1. "change attributes
DATA END OF OBJECT_HD_CHANGE.
DATA BEGIN OF OBJECT_CONTENT OCCURS 5. "SAPoffice: Single List with
INCLUDE STRUCTURE SOLISTI1. "Column Length 255
DATA END OF OBJECT_CONTENT.
DATA BEGIN OF REC_TABLE OCCURS 1. "SAPoffice: recipient with
INCLUDE STRUCTURE SOOS1. "attributes
DATA END OF REC_TABLE.
* Build email recipient table...........................................
CLEAR REC_TABLE.
REC_TABLE-SEL = 'X'.
REC_TABLE-RECESC = 'U'.
*rec_table-recnam = 'BASF'.
REC_TABLE-RECEXTNAM = PDIREC_EMAIL.
TRANSLATE REC_TABLE-RECEXTNAM TO LOWER CASE.
REC_TABLE-ADR_NAME = PDIREC_EMAIL.
TRANSLATE REC_TABLE-ADR_NAME TO LOWER CASE.
REC_TABLE-SNDEX = 'X'.
REC_TABLE-SNDPRI = '1'.
REC_TABLE-MAILSTATUS = 'E'.
REC_TABLE-SNDSPO = PORD_SPOOL .
COLLECT REC_TABLE.
*...Subject.Line........................................................
CLEAR OBJECT_HD_CHANGE.
OBJECT_HD_CHANGE-OBJDES = PASUNTO.
* Send Email............................................................
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
OBJECT_HD_CHANGE = OBJECT_HD_CHANGE
OBJECT_TYPE = 'RAW'
OUTBOX_FLAG = 'X'
TABLES
OBJCONT = PTEXTO
RECEIVERS = REC_TABLE
EXCEPTIONS
ACTIVE_USER_NOT_EXIST = 1
COMMUNICATION_FAILURE = 2
COMPONENT_NOT_AVAILABLE = 3
FOLDER_NOT_EXIST = 4
FOLDER_NO_AUTHORIZATION = 5
FORWARDER_NOT_EXIST = 6
NOTE_NOT_EXIST = 7
OBJECT_NOT_EXIST = 8
OBJECT_NOT_SENT = 9
OBJECT_NO_AUTHORIZATION = 10
OBJECT_TYPE_NOT_EXIST = 11
OPERATION_NO_AUTHORIZATION = 12
OWNER_NOT_EXIST = 13
PARAMETER_ERROR = 14
SUBSTITUTE_NOT_ACTIVE = 15
SUBSTITUTE_NOT_DEFINED = 16
SYSTEM_FAILURE = 17
TOO_MUCH_RECEIVERS = 18
USER_NOT_EXIST = 19
ORIGINATOR_NOT_EXIST = 20
X_ERROR = 21
OTHERS = 22.
*...SAPconnect.........................................................
*...Start to Dispach mail
SUBMIT RSCONN01 "SAPconnect Start Send Process
WITH MODE EQ '*'
WITH OUTPUT EQ ''
TO SAP-SPOOL
DESTINATION 'LOCAL'
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
WITHOUT SPOOL DYNPRO
AND RETURN.
Edwin Mukusha
<emukusha at nebraska. Para: SAP-WUG at MITVMA.MIT.EDU
edu> cc:
Enviado por: SAP Asunto: Header problems with e-mail messages....
Workflow
<Owner-SAP-WUG at MITV
MA.MIT.EDU>
26/04/2004 12:45
Por favor, responda
a "SAP Workflow
Users' Group"
Hi everyone,
I am trying to find a way to specify a reply-to address on a message coming
out of SAP. We currently use the MTA connection to Lotus to send e-mail
messages from our workflow. We are running 4.6C.
Some background: I have a process that sends exception messages to
responsible parties about budget balances in Project Systems. Currently
these e-mail messages have the wf-batch e-mail address
(SAPWorkflowproduction at xxxx.com) that is mapped back to my lotus inbox.
I need to be able to get these messages with a different sender to reply
to, as currently my inbox is getting swamped with end-user queries/feedback
on their budget balances!
I have been able to create a method that will allow me to specify a
different sender using function module 'SO_DOCUMENT_SEND_API1'. However
this solution gives me a message that looks like it was actually generated
by that sender, yet it originated from SAP. My ideal solution would be for
the message to read as follows:
>From: SAPWorkflowproduction at xxxx.com
>Reply-to: psmanager at xxxx.com
>Sent: Thursday,22 June 2004 5:48 AM
>To: enduser at xxxx.com
>Subject: Exception budget Balances
If the reply-to option is not possible. I am willing to take a second
possible solution; is it possible to specify some text prefixing the
sender's address coming out SAP? If this is possible I would then be able
to pad sender's e-mail address like this maybe:
example taken from:
"SAP Workflow Users' Group" <SAP-XXX at MITVMA.MIT.EDU>
mine would look like this:
>From: "Message sent from SAP WF on behalf of" <psmanager at xxxx.com>
>Sent: Thursday,22 June 2004 5:48 AM
>To: enduser at xxxx.com
>Subject: Exception budget Balances
Searching through our WF discussion group was a challenge because the
keyword reply-to is in just about every message on this list. I have also
searched through OSS without much luck.
I would appreciate any help on this matter.
Thanks...
Edwin Mukusha.
More information about the SAP-WUG
mailing list