Sending external emails thru Mail relay in Lion Server

Hi,
I've setup Lion Server with a Mail Relay for outgoing emails and currently paying for x amount of emails per day.
Does Lion Server send all outgoing emails through the relay, or is it smart enough to know that internal emails (on the same subdomain) or emails generated by web apps on the server itself do not go through the relay because it can deliever it directly into the mailbox that resides on itself?
We generate a lot of emails internally, but only a handful to external addresses.
I'm looking for information about this but I havne't found anything yet.
Please let me know.
Thanks!

The mail server first checks the domain of any recipient. If it's a local domain (i.e. one that the server handles) then it just passes that message to the user's mailbox.
It's only non-local domains that need passing upstream through your relay, so you can send as many internal emails as you like - they won't touch your relay server.

Similar Messages

  • Mail aliases in Lion Server

    I have two servers that are both running mail.  I'd like to be able to have them back each other up.  If an email comes into server 1 and server 2 (where account is) is not available, I'd like Server 1 to hold that mail until Server 2 comes back on line.
    Previously, in OSX Server, in Workgroup Manager, you could specify a forwarding address for a user and this worked great. In Lion Server, there is no such provision.
    So, I edited the /etc/aliases file to add an alias to each such user. I run newaliases and restart the mail server.  If I ( with an account on a given server) send an email from mail.app through that server, it properly forwards it to the right server.  If there is an incoming email from somewhere else on the internet, then it won't forward it to the correct server but simply rejects it.
    I suppose I could go through and create a complete set of duplicate accounts and then go to the web client and specify the redirect through a filter but that would be a total pain.
    What am I doing wrong? 
    J.

    Hi
    "Previously, in OSX Server, in Workgroup Manager, you could specify a forwarding address for a user and this worked great. In Lion Server, there is no such provision."
    If I've understood you correctly that's not strictly true. There's a number of ways you can do this. You could consider using WebMail or the command line:
    http://support.apple.com/kb/HT5032
    HTH?
    Tony

  • Please help in senplease help in smartform send external email send.

    hii all,
    pleaseeeeeeeee help in sending external email in smartform print program.
    i need for RLB_INVOICE order confirmation to send thru email.
    what to code in ZRLN_INVOICE . i copied RLB_INVOICE in zprog.
    so  what rthe changes i need to code in driver program?
    pleaseeeeeeee help with sample coding..

    Here is the code to send the Smartform to mail as PDF attachment.
    *& Report ZTEST_PDF_MAIL
    REPORT ZTEST_PDF_MAIL.
    Internal Table declarations
    DATA: I_OTF TYPE ITCOO OCCURS 0 WITH HEADER LINE,
    I_TLINE TYPE TABLE OF TLINE WITH HEADER LINE,
    I_RECEIVERS TYPE TABLE OF SOMLRECI1 WITH HEADER LINE,
    I_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    Objects to send mail.
    I_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
    I_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
    WA_OBJHEAD TYPE SOLI_TAB,
    W_CTRLOP TYPE SSFCTRLOP,
    W_COMPOP TYPE SSFCOMPOP,
    W_RETURN TYPE SSFCRESCL,
    WA_DOC_CHNG TYPE SODOCCHGI1,
    W_DATA TYPE SODOCCHGI1,
    WA_BUFFER TYPE STRING, "To convert from 132 to 255
    Variables declarations
    V_FORM_NAME TYPE RS38L_FNAM,
    V_LEN_IN LIKE SOOD-OBJLEN,
    V_LEN_OUT LIKE SOOD-OBJLEN,
    V_LEN_OUTN TYPE I,
    V_LINES_TXT TYPE I,
    V_LINES_BIN TYPE I.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    FORMNAME = 'ZTEST'
    IMPORTING
    FM_NAME = V_FORM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    W_CTRLOP-GETOTF = 'X'.
    W_CTRLOP-NO_DIALOG = 'X'.
    W_COMPOP-TDNOPREV = 'X'.
    CALL FUNCTION V_FORM_NAME
    EXPORTING
    CONTROL_PARAMETERS = W_CTRLOP
    OUTPUT_OPTIONS = W_COMPOP
    USER_SETTINGS = 'X'
    IMPORTING
    JOB_OUTPUT_INFO = W_RETURN
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I_OTF[] = W_RETURN-OTFDATA[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    IMPORTING
    BIN_FILESIZE = V_LEN_IN
    TABLES
    OTF = I_OTF
    LINES = I_TLINE
    EXCEPTIONS
    ERR_MAX_LINEWIDTH = 1
    ERR_FORMAT = 2
    ERR_CONV_NOT_POSSIBLE = 3
    OTHERS = 4.
    IF SY-SUBRC <> 0.
    ENDIF.
    LOOP AT I_TLINE.
    TRANSLATE I_TLINE USING '~'.
    CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
    I_RECORD = WA_BUFFER.
    APPEND I_RECORD.
    SHIFT WA_BUFFER LEFT BY 255 PLACES.
    IF WA_BUFFER IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Attachment
    REFRESH: I_RECLIST,
    I_OBJTXT,
    I_OBJBIN,
    I_OBJPACK.
    CLEAR WA_OBJHEAD.
    I_OBJBIN[] = I_RECORD[].
    Create Message Body Title and Description
    I_OBJTXT = 'test with pdf-Attachment!'.
    APPEND I_OBJTXT.
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
    READ TABLE I_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR I_OBJPACK-TRANSF_BIN.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND I_OBJPACK.
    Attachment (pdf-Attachment)
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    READ TABLE I_OBJBIN INDEX V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'smart'.
    I_OBJPACK-OBJ_DESCR = 'test'.
    APPEND I_OBJPACK.
    CLEAR I_RECLIST.
    I_RECLIST-RECEIVER = '[email protected]'.
    I_RECLIST-REC_TYPE = 'U'.
    APPEND I_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    COMMIT_WORK = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_OBJHEAD
    CONTENTS_BIN = I_OBJBIN
    CONTENTS_TXT = I_OBJTXT
    RECEIVERS = I_RECLIST
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8.
    IF SY-SUBRC <> 0.
    WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
    WRITE:/ 'Mail sent'.
    ENDIF.
    If you want to send some text as Body of the Mail then follow this once
    when u r callin the FM'SO_NEW_DOCUMENT_ATT_SEND_API1'.. points to remember
    1.u have to pass the body of content in table CONTENTS_TXT(ia m using I_OBJBIN) (each line a record) then. suppose i have appended 11 records to the table CONTENTS_TXT .
    2.PACKING_LIST(iam usign I_OBJPACK) table u ahve to append a redord as follows
    I_OBJPACK-TRANSF_BIN = ' '.
    I_OBJPACK-HEAD_START = 000000000000001.
    I_OBJPACK-HEAD_NUM = 000000000000001.
    I_OBJPACK-BODY_START = 000000000000002
    I_OBJPACK-BODY_NUM = 000000000000010.
    I_OBJPACK-DOC_TYPE = 'RAW'.
    append I_OBJPACK-.
    by the above code system treat the first line in table I_OBJBIN as header and the 2nd line to 10 lines tread as body.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = WA_DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    TABLES
    PACKING_LIST = I_OBJPACK
    OBJECT_HEADER = WA_OBJHEAD
    CONTENTS_BIN = I_OBJBIN
    CONTENTS_TXT = I_OBJTXT
    RECEIVERS = I_RECLIST
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8.
    regards,
    srinivas

  • Need to send external email with attachment for workflow 20000075

    Hello Everyone,
    I am new to W/F, I Need to send external email with attachment for PO Release W/F 20000075. Currently Work item is being sent to SAP inbox of required user based on PO Release strategy configuration in SPRO. I tried to create Send mail step after PO release event but I am not sure how to arrive at Recipient type in send mail step(the mail should be sent to person in the release strategy). Everything looks fine all I need to do is to send external email with attachment instead of sending work item into SAP inbox.
    Your help will be highly appreciated.
    Thanks.

    You can use extended notifications to send an e-mail message with a link to the workitem. Search for extended notifications in SDN.
    Regards,
    Martin

  • Sending external email via SAPCONNECT

    Hi all,
    I want to know how to send external email through sap.
    Thanks in advance,
    Manosh.

    HI,
    Try this  code:
    *& Report  ZSENDEMAIL                                                  *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  zsendemail                    .
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default '[email protected]' .
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
          Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
          Send email message
    form send_email_message.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    Reward points if found helpful....
    Cheers,
    Chandra Sekhar.

  • Sending external email from SAP with following requirements...

    Hi All,
           I need to send external emails from SAP by meeting following requirements.
    1) With subject line more than 100 characters.
    2) No attachments, only body which has specific format (blueprint/layout) and would be amended often, hence code shouldn't be touched during amendments.
    3) Should be able to know the success/failure of mail sending at program level.

    Hi,
    The code below demonstrates how to send an email to an external email address
    *& Report  ZSENDEMAIL                                                  *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  zsendemail                    .
    PARAMETERS: psubject(40) type c default  'Hello',
                p_email(40)   type c default '[email protected]' .
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Perform populate_message_table.
    *Send email message, although is not sent from SAP until mail send
    *program has been executed(rsconn01)
    PERFORM send_email_message.
    *Instructs mail send program for SAPCONNECT to send email(rsconn01)
    perform initiate_mail_execute_program.
    *&      Form  POPULATE_MESSAGE_TABLE
          Adds text to email text table
    form populate_message_table.
      Append 'Email line 1' to it_message.
      Append 'Email line 2' to it_message.
      Append 'Email line 3' to it_message.
      Append 'Email line 4' to it_message.
    endform.                    " POPULATE_MESSAGE_TABLE
    *&      Form  SEND_EMAIL_MESSAGE
          Send email message
    form send_email_message.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      gd_doc_data-obj_name  = 'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Add the recipients email address
      clear it_receivers.
      refresh it_receivers.
      it_receivers-receiver = p_email.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      it_receivers-notif_del = 'X'.
      it_receivers-notif_ndel = 'X'.
      append it_receivers.
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_txt               = it_message
                receivers                  = it_receivers
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                others                     = 8.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    endform.                    " SEND_EMAIL_MESSAGE
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    form initiate_mail_execute_program.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = 'X'
                        and return.
      endif.
    endform.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • To send external email from ABAP

    How to send external email from ABAP Program and what are the settings to be done for the same ?

    Please check..
    Sending External email through SAP
    What is the FM for sending the external email through SAP by attaching layout set  to it?
    These are the FM for sending external email :-
    SO_DOCUMENT_SEND_API1 
    SAPoffice: Send new document with attachments via RFC 
    SO_NEW_DOCUMENT_ATT_SEND_API1
    (In 4.6C only, You can go to SE37 and click the documentation on how to use it. A sample program is provided there.)
    SAPoffice: Send new document with attachments via RFC 
    Note : If you are using FM SO_NEW_DOCUMENT_ATT_SEND_API1 then Export Parameter DOCUMENT_DATA-OBJ_DESCR contains the Subject. 
    SO_NEW_DOCUMENT_SEND_API1 
    SAPoffice: Send new document 
    How to send a report to an external mail-id?
    Try this sample code :-
    REPORT ZREPORT_TO_EMAIL NO STANDARD PAGE HEADING LINE-SIZE 200.
    DATA : BEGIN OF ITAB OCCURS 0,
    PERNR LIKE PA0001-PERNR,
    ENAME LIKE PA0001-ENAME,
    END OF ITAB.
    DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
    receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
    packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
    listobject LIKE abaplist OCCURS 10,
    compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
    w_object_hd_change LIKE sood1,
    compressed_size LIKE sy-index.
    START-OF-SELECTION.
    SELECT PERNR ENAME
    INTO CORRESPONDING FIELDS OF TABLE ITAB
    FROM PA0001
    WHERE PERNR < 50.
    LOOP AT ITAB.
    WRITE :/02 SY-VLINE , ITAB-PERNR, 15 SY-VLINE , ITAB-ENAME, 50
    SY-VLINE.
    ENDLOOP.
    Receivers
    receiver_list-recextnam = '[email protected]'. "-->
    EMAIL ADDRESS
    RECEIVER_list-RECESC = 'E'. "<-
    RECEIVER_list-SNDART = 'INT'."<-
    RECEIVER_list-SNDPRI = '1'."<-
    APPEND receiver_list.
    General data
    w_object_hd_change-objla = sy-langu.
    w_object_hd_change-objnam = 'Object name'.
    w_object_hd_change-objsns = 'P'.
    Mail subject
    w_object_hd_change-objdes = 'Message subject'.
    Mail body
    APPEND 'Message content' TO message_content.
    Attachment
    CALL FUNCTION 'SAVE_LIST'
    EXPORTING
    list_index = '0'
    TABLES
    listobject = listobject.
    CALL FUNCTION 'TABLE_COMPRESS'
    IMPORTING
    compressed_size = compressed_size
    TABLES
    in = listobject
    out = compressed_attachment.
    DESCRIBE TABLE compressed_attachment.
    CLEAR packing_list.
    packing_list-transf_bin = 'X'.
    packing_list-head_start = 0.
    packing_list-head_num = 0.
    packing_list-body_start = 1.
    packing_list-body_num = sy-tfill.
    packing_list-objtp = 'ALI'.
    packing_list-objnam = 'Object name'.
    packing_list-objdes = 'Attachment description'.
    packing_list-objlen = compressed_size.
    APPEND packing_list.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    object_hd_change = w_object_hd_change
    object_type = 'RAW'
    owner = sy-uname
    TABLES
    objcont = message_content
    receivers = receiver_list
    packing_list = packing_list
    att_cont = compressed_attachment.

  • ABAP send external email

    I use FM SO_OBJECT_SEND to send external email in my Z program but the output always in attachment format, depend on the format i specified (pdf,htm,txt,xls). I want the output to be in standard email body. How to do it?

    Hi,
    Can you please send your code or check if you are passing att_cont parameter in your function module. I would suggest you to use SO_NEW_DOCUMENT_SEND_API1 function module to send mail.
    Also find the code below for your reference.
    REPORT  z_test_email_sending.
    DATA:  t_reclist TYPE TABLE OF somlreci1,
          wa_receiver LIKE LINE OF t_reclist,
          objcont TYPE TABLE OF solisti1,
         subject TYPE TABLE OF solisti1,
         objline TYPE solisti1,
          w_line_count   TYPE i,
            doc_chng TYPE sodocchgi1,
            offset type i.
    CONSTANTS c_sep  TYPE c VALUE '|'.
    DATA : BEGIN OF mail_line OCCURS 0,
          sep0,
          model_year(6),
          sep1,
          mf(4),
          sep2,
          type(5),
          sep3,
          variant(14),
          sep4,
          kitype(5),
          sep5,
          option(8),
          sep6,
          color(8),
          sep7,
          uph(11),
          sep8,
          struc_week(10),
          sep9,
        END OF mail_line.
    *construct the message and the e-mail
    wa_receiver-receiver = receivers mail id.
    * Email Subject
    doc_chng-obj_name = 'test mail'.
    MOVE 'Cost Error from SAP' TO doc_chng-obj_descr.
    doc_chng-obj_langu = sy-langu.
    *    doc_chng-SENSITIVTY = 'P'.
    * Email body
    CLEAR objline.
    CONCATENATE 'This is an automatically generated email'
    'Please do not reply to this email.'
    INTO   objline SEPARATED BY space.
    APPEND objline TO objcont.
    CLEAR objline.
    APPEND objline TO objcont.
    CONCATENATE 'Cost errors in SAP as on' sy-datum INTO
    objline SEPARATED BY space.
    APPEND objline TO objcont.
    CLEAR objline.
    CLEAR objline.
    APPEND objline TO objcont.
    * horizontal line at beginning of records
    DO 80 TIMES.
      IF sy-index = 1.
    *   objline+sy-index(1) = ' '.
        continue.
      ELSE.
        offset = sy-index - 1.
        objline+offset(1) = '-'.
      ENDIF.
    ENDDO.
    clear offset.
    APPEND objline TO objcont.
    CLEAR objline.
    mail_line-sep0 = c_sep.
    mail_line-model_year = 'Model Yr'.
    mail_line-sep1 = c_sep.
    mail_line-mf = 'Mf'.
    mail_line-sep2 = c_sep.
    mail_line-type = 'Type'.
    mail_line-sep3 = c_sep.
    mail_line-variant = 'Variant'.
    mail_line-sep4 = c_sep.
    mail_line-kitype = 'Ki-type'.
    mail_line-sep5 = c_sep.
    mail_line-option = 'Option'.
    mail_line-sep6 = c_sep.
    mail_line-color = 'Color'.
    mail_line-sep7 = c_sep.
    mail_line-uph = 'Upholstery'.
    mail_line-sep8 = c_sep.
    mail_line-struc_week = 'Str_week'.
    mail_line-sep9 = c_sep.
    MOVE mail_line TO objline.
    APPEND objline TO objcont.
    CLEAR mail_line.
    CLEAR objline.
    * horizontal line at beginning of records
    *horizontal line at beginning of records
    DO 80 TIMES.
      IF sy-index = 1.
    *   objline+sy-index(1) = ' '.
        continue.
      ELSE.
        offset = sy-index - 1.
        objline+offset(1) = '-'.
      ENDIF.
    ENDDO.
    clear offset.
    APPEND objline TO objcont.CLEAR objline.
    DO 5 TIMES.
      mail_line-sep0 = c_sep.
      mail_line-model_year = 'xxxx'.
      mail_line-sep1 = c_sep.
      mail_line-mf = 'xxx'.
      mail_line-sep2 = c_sep.
      mail_line-type = 'xxx'.
      mail_line-sep3 = c_sep.
      mail_line-variant = 'xxxx xxxxx'.
      mail_line-sep4 = c_sep.
      mail_line-kitype = 'xxx'.
      mail_line-sep5 = c_sep.
      mail_line-option = 'xxxxxx'.
      mail_line-sep6 = c_sep.
      mail_line-color = 'xxxxxx'.
      mail_line-sep7 = c_sep.
      mail_line-uph = 'xxxxxx'.
      mail_line-sep8 = c_sep.
      mail_line-struc_week = 'xxxxxx'.
      mail_line-sep9 = c_sep.
      MOVE mail_line TO objline.
      APPEND objline TO objcont.
    ENDDO.
    CLEAR objline.
    *horizontal line at beginning of records
    DO 80 TIMES.
      IF sy-index = 1.
    *   objline+sy-index(1) = ' '.
        continue.
      ELSE.
        offset = sy-index - 1.
        objline+offset(1) = '-'.
      ENDIF.
    ENDDO.
    clear offset.
    APPEND objline TO objcont.
    CLEAR objline.
    wa_receiver-rec_type = 'U'.
    wa_receiver-com_type = 'INT'.
    APPEND wa_receiver TO t_reclist.
    *   size
    DESCRIBE TABLE objcont LINES w_line_count.
    READ TABLE objcont INDEX w_line_count INTO objline.
    doc_chng-doc_size = ( w_line_count - 1 ) * 255 +
                           STRLEN( objline ).
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                  EXPORTING
                    document_data              = doc_chng
                    document_type              = 'RAW'
    *                  put_in_outbox              = ' '
                    commit_work                = 'X'
                  TABLES
    *                  object_header             = subject
                    object_content             = objcont
                    receivers                  = t_reclist
                  EXCEPTIONS
                    too_many_receivers         = 1
                    document_not_sent          = 2
                    operation_no_authorization = 4
                    OTHERS                     = 9.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    KR Jaideep,

  • When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    Hi, thanks for the answer, I did that already. Unfortunatly this doesn't help me at all, as I often forget to check the menu. For me composing the message is writing the text, the subject, the person to who is addressed and than press "send".
    I often forget to check the "from", and this is a problem because the software select itself one of the accounts.
    Isn't there a way at least to put as a default a blank field instead of one of the accounts? or an account which doesn't work so if I forget to specify the "from" I will be rnotofied that the message can't be sent.
    I guess this could be a rather common problem for many people!
    Thanks
    Sergio

  • Mail always shows sending two emails in Mail activity

    Hi, I have noticed, that even when I send only one email, the Mail activity reports "sending 2 mails". Does anyone know why that is?
    Thanks in advance
    ralf

    It's because you're using an IMAP account, which resides on the server, not on your Mac. So whenever you send an email, it's sent to the server, which then sends it back to your Mac, so the two are always in sync.

  • I am having trouble sending an email from mail on my macbook pro. It keeps requesting my password. What should I do?

    I am having trouble sending an email from mail on my macbook pro. It keeps requesting my password. What should I do?

    There seems to be a few bugs with iCloud Mail at times, so send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback
    Apple support article, but I don't think it really addresses your problem.
    iCloud - Mail Troubleshooting

  • Disallow sending External email

    Hi, how to configure Exchange 2013 to disallow certain users to send external email

    Hi,
    As what DareDevil57 mentioned above, we can create a transport rule to meet this requirement.
    Here is an article about transport rule for your reference.
    Transport Rules:
    http://social.technet.microsoft.com/Forums/en-US/dedce6eb-f4b9-42be-b732-dba691b6c284/disallow-sending-external-email?forum=exchangesvradmin
    Hope this helps.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • If I try to send an email ,I got the message "the server doesn't accept this email address".It happened suddenly,before it worked correctly and I didn't change anything

    If I try to send an email ,I got the message "the server doesn't accept this email address".It happened suddenly,before it worked correctly and I didn't change anything

    Change the password on that e-mail account. It's possible that your account has been hacked/spoofed and spammers have used it to blast out junk, leaving you to 'pay the price'. If it's one where you can contact the company, contact them and ask them what's going on. (if this is g-mail, yahoo, hotmail, don't bother, there's no way to contact any sort of support)

  • SL Mail store to Lion Server

    Hi,
    I've done a fresh install of Lion on a separate drive. I'm trying to work out how you import the old mail store to Lion Server. Has anyone been successful with this?
    Thanks

    There's a walkthrough of how to theorhetically do this in the "Upgrading and Migrating" manual; but it never worked for me at all.  (And migration clearly doesn't at all either.)  Wish I could be more help, I have some tickets open but zero response yet.

  • Sending external email from forms

    Hello.
    I want to send an email using a form and a report. The report is the attachment of the email. I run the report from form using this command
    v_rep := RUN_REPORT_OBJECT(repid);
    If i send the mail to an internal address, works properly. If i want to send the email to an external address i have this error:
    FRM-41214
    Error when running report ORA - 0000: normal, successful completion
    I made a check with telnet on my computer and i managed to send an mail to an external address.
    Anyone has any idea?
    Thanks.

    I looked at the logs on the SMTP server, the extern mail doesn't even reach the SMTP server queue.
    I enabled the trace for the report server and I get this error:
    [2008/6/6 0:52:18:703] Exception 50152 (): Error while sending mail - Sending failed;
    nested exception is:
    javax.mail.SendFailedException: Invalid Addresses;
    nested exception is:
    javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
    oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
    at oracle.reports.utility.Utility.newRWException(Utility.java:756)
    at oracle.reports.server.MailService.send(MailService.java:492)
    at oracle.reports.server.DesMail.sendFile(DesMail.java:186)
    at oracle.reports.server.Destination.send(Destination.java:489)
    at oracle.reports.server.JobObject.distribute(JobObject.java:1582)
    at oracle.reports.server.JobManager.updateJobStatus(JobManager.java:2231)
    at oracle.reports.server.EngineCommImpl.updateEngineJobStatus(EngineCommImpl.java:134)
    at oracle.reports.server._EngineCommImplBase._invoke(_EngineCommImplBase.java:94)
    at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
    at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
    at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
    at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
    Thanks

Maybe you are looking for

  • Trying to solve the hashtable problem;

    this is a test of a part of my programming, trying to solve the hashtable i took out the erronous part and change some of it.i'm trying to print out a table of data with 4 column import java.util.*; public class test {      // creating a global hasht

  • Calling an external web service from a session bean

    We're integrating our Weblogic EJB application with a third party JBoss-based product that exposes a web service API. I thought that Weblogic should have all of the libraries available that I would need in order to make this connection. However, when

  • Umwandlung .docx- pdf - Bilder fehlerhaft (Musterfüllung)

    Hallo, ich habe ein Problem beim umwandeln von Word Dokumenten in PDF mit Acrobat X Pro. Ich benutze in Acrobat die Funktion PDF erstellen. Im Word Dokument habe ich Excel Tabellen mit streifiger Musterfüllung (das sind eigentlich ganz feine Streifen

  • Images repository in portal

    Hi, I am planning to configure  Portal welcome screen,Theme and pages with some custom (Client) logos etc. Similar to SE80 in BW, MIME repository Is there any central location I can first save/upload all the images I required in portal and then use t

  • DW8 - won't display CSS layout

    I've just started a new website in DW and the layout isn't being renderred within DW but works fine in the browser. My div colours are displaying with no problems but the widths etc. just aren't appearing. All my visual aids are on so can't understan